Announcement

Collapse
No announcement yet.

Ending a mission...with a trigger..??

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ending a mission...with a trigger..??

    Hey guys,

    Can anyone give me any idea on how to end a mission after a specific objective has been accomplished???

    I've looked everywhere and can't find anything that helps...What I want to do is set an objective...which I can now do...and then once that objective is accomplished make the mission end..

    I'm sure it has to do with triggers...but I cannot figure it out!! LOL

    Thanks,

    Chappie

  • #2
    Re: Ending a mission...with a trigger..??

    I am having objective problems myself too. I know how to get a mission to end one all is destroyed, if that is what you want I can explain that. I think it would be better if once all was destroyed then you go the extraction area and once everyone is their the mission would end. That I can figure out too but I dont know how to combine them so after you destroy whatever you can then extract.

    If you want to do the extract one. Just pick where you want them to extract and make a trigger. The selections you need are Blufor, Once, Present, End #1. Then go down to effects and select your ending effects.

    If you want the mission to end on the destruction of a building, make another trigger. This one you want None, Not Present, End #1. On the Condition line put damage
    Code:
    damage (position player nearestObject ######) >= 1
    The # is the id of the building you want destroyed. Then select your effects and the mission will end as soon as it is destroyed.

    Hopefully that helps you out some. I am just trying to combine the destruction of something then you can extract. Right now you can extract any time, but I dont want it like that.

    Comment


    • #3
      Re: Ending a mission...with a trigger..??

      Thanks Turbo!!

      I'll give that a shot.....this stuff is more complicated than I hoped!!! LOL

      If I run across anything helpful I'll let you know..

      thanks,

      Chappie

      Comment


      • #4
        Re: Ending a mission...with a trigger..??

        Hey Turbo!!

        Thanks much man!!

        that worked perfectly!!! thanks bro...now I just have to upload the darn thing again...

        woohoo!! a proper ending!!

        Chappie

        Comment


        • #5
          Re: Ending a mission...with a trigger..??

          This is from a pretty hard core OFP Mission Editing Tutorial, called OpFlash Uber Editor Tutorial (PDF).

          Even though Turbo gave you the answer...I immediately thought of this post when I saw this tutorial at the OFPEC site. It's 302 pages of Mission Editing Love. Lot's of other nifty tuts there as well.

          I don't know anything about editing, and I certainly don't know if this still applies to OFP...but this looks like it may help. Download the file and search for the text "objective".

          Every mission needs objectives, and therefore to be completed and then end the mission in either a failure or a success! Well, you might ask (as many people have asked me), how do I detect and end objectives and then end the mission when all objectives are complete? Very easy!

          This tutorial will teach you something ALL your missions will require to have to work properly…

          We will be making an extremely simple mission, which will make use of these requirements, thus, teaching you how to use them…Make sure the editor is working in “Advanced” mode. If “Easy” is displayed at the top right corner of the editor, click on the text until it says “Advanced”. For your information, we’ll make a mission where you have to kill two men to win objective 1 and then kill another guy to win objective 2 and thus, winning the mission…

          1 > Inserting The Player (YOU!) First of all, we need you there obviously ? So select the “Units” tool from the top and double click anywhere on the island (ground). From the properties window, select side “West”, type “Men” and unit “Soldier” (any is ok but Soldier is good enough), in control select “Player”. After this, click “Ok” and your player unit is set up.

          2 > Inserting The Enemies (Both Objectives)
          Select the units tool from the top and double click somewhere in front of the player unit. From the properties window, select side “East”, type “Men” and unit “Soldier”. In the “Name” field, type “eGuy1” for this one and then click “Ok”. After this, double click just beside the guy and set the same properties, but for the name, type “eGuy2” and then click “Ok”. Ok, now we’ve got the first objective guys inserted. Now for the next one, double click in front of the other two guys away from the player too. In the properties, set side “East”, type “Men” and unit “Officer”. In the name field, type “eOfficer”, then click “Ok”. Done! The guys for your objectives are done, but now for the detection of the killing of those guys… We can refer to these three since you named them ? This will get you familiar with how naming units will enable you to do stuff with them.

          3 > Finalizing And Inserting The Objective Detection Triggers Ok. So we’ve got the guys, but we need a trigger to detect they’re dead so the objectives are done. Select the “Triggers” tool from the top and double click somewhere between all the guys. In the “Axis A” and “Axis B”, make sure it covers at least one enemy so it is triggered when mission starts. In the “Activation”, select “East”. In “Condition”, type: GetDammage eGuy1 >= 1 AND GetDammage eGuy2 >= 1 The “GetDammage” command will return a 1 or a bit above if the unit is dead, lower than 1 is damaged but not dead, and 0 is undamaged. The symbols “>= 1” say if the damage of the guys is larger or equals to 1. The “AND” makes the condition detect if BOTH are dead, but if you replace “AND” by “;”, then it tries to detect if ONE of them is dead ? For this tutorial, “AND” is the best we should use.

          In the “On Activation” field, type:
          “1” ObjStatus “DONE”; obj1c = 1

          Now click the “Effects” button and at the bottom, in the “Type” list, select “Text” and under that, in the text field, type: Objective 1 Completed…

          Then click “Ok”, and again click “Ok”.

          The “ObjStatus” command sets a present condition to a certain objective. Please note, the FIRST objective is “1” and not “0” like some games. If you have four objectives, the first is “1”, second “2”, third “3” and last “4”. There are other set conditions other than “DONE”, they are: “DONE” = Objective complete.
          “FAILED” = Objective failed.
          “HIDDEN” = Objective will not appear in mission.

          “DONE” and “FAILED” are the most commonly used unless an objective fail triggers a hidden objective to appear since the objective failure SHOULD happen to follow the mission’s story, such as many of the game’s campaign missions… “obj1c” is a variable we used that we assign “1” for later use in mission accomplishment. Let me let you know of something first. Objectives you add when you create the briefing and overview files for your mission. If you want to create the briefing and overview files easily, download DoubleA’s great tool to create them very easily. Get it from my “Tutorials” page, under “Other Downloads” in my website, called the “Briefing And Overview Generator” currently in version 1.5.

          Select the “Triggers” tool from the top and double click somewhere between the enemies again, somewhere near the first trigger. In this one, make sure “Axis A” and “Axis B” are large enough to at least cover one enemy so it is triggered when mission starts. In the “Activation” list, select “East” and in the “Condition” field, type: GetDammage eOfficer >= 1
          In the “On Activation” field, type:
          “2” ObjStatus “DONE”; obj2c = 1

          Now click the “Effects” button, and at the bottom, on the “Type” list, select “Text” and under that, in the text field, type:
          Objective 2 Completed…

          Now, both objectives are detected when completed, and you notice, I’ve again used a variable when objective 2 is done, this time it’s named “obj2c” instead of “obj1c” because obviously, it’s objective 2 this time, not 1. This time, lets insert the end mission trigger, select the “Triggers” tool and double click somewhere in the middle of everything. Here, select “West” on “Activation” (so YOU trigger it when mission starts) and make sure “Axis A” and “Axis B” are big enough to cover the player unit (you). In the “Type” list (third section in trigger window), select “End #1”. In the “Condition” field, type:
          obj1c == 1 AND obj2c == 1

          Click the “Effects” button and at the bottom, in “Type”, select “Text” and then in the text field, type:
          Mission Accomplished!

          From the “Music” list where it says “No track”, select something like the “Heroes” music track. Click the “Ok” button, and then again, click “Ok”. Do you see what I did? The mission will end since we selected “End #1” from the “Type” list, but it won’t end until “obj1c” and “obj2c” are both 1. They will be “1” when both objectives are done! Once the missio n ends, the text “Mission Accomplished!” will appear in the middle of the screen and some music will start to play, and when the text disappears, the debriefing notepad appears. Please note, you define what is shown in “End #1” and “End #2” and all the others (till End #6”) in the briefing and overview files, which as mentioned earlier, can be created easily with a tool I mentioned above too… All done!
          Your tutorial mission should look something like this in the editor: Please note the above screenshot shows what I did which defers to what I did which really was ONE objective (killing two guys) and now a second one like I showed you above. But anyhow, your tutorial mission should look very alike to the above, although you should have one more guy and one more trigger there. Try it out, click the “Preview” button on the right toolbar and kill the first two guys, then the third one in front of the two first ones. You’ll see how it ends perfectly… Please note, you really don’t need the briefing and overview files for this tutorial mission since the mission WILL still end and the screen will display the objective completed text and the mission accomplished text, but when you look at the notepad on the map, you won’t see any objectives done since there aren’t any because you still haven’t created the briefing and overview files.
          That should be it, you should now know how to end missions and end objectives properly for your missions. Anyhow, you may contact me at anytime for further help ;)
          |TG| HOUDINI






          Comment


          • #6
            Re: Ending a mission...with a trigger..??

            Hey Houdini!!

            Thanks alot bro..looks like alot of good stuff there..definitely will be useful..

            thanks!!

            Chappie

            Comment


            • #7
              Re: Ending a mission...with a trigger..??

              Originally posted by Chappie View Post
              Thanks Turbo!!

              I'll give that a shot.....this stuff is more complicated than I hoped!!! LOL

              If I run across anything helpful I'll let you know..

              thanks,

              Chappie
              You said a mouthful there Chappie...I'm thinking of calling out to the more experienced modders and asking for help.
              sigpic
              |TG-1st|Grunt
              ARMA Admin (retired)
              Pathfinder-Spartan 5

              Comment

              Connect

              Collapse

              TeamSpeak 3 Server

              Collapse

              Advertisement

              Collapse

              Twitter Feed

              Collapse

              Working...
              X