Home   Help Search Login Register  

Author Topic: How to end a mission  (Read 1590 times)

0 Members and 1 Guest are viewing this topic.

Offline bakerboy1990

  • Members
  • *
How to end a mission
« on: 26 Mar 2009, 21:11:12 »
hi i am brand new to mission editing so i dont know to much, basically i am wondering how do i finish a mission? the only way i know is "this and not canmove [name]" this only works when the soldier or vehicle etc is destroyed/killed then the mission finishes, i want to know how to end a mission after going through the objectives and killing every1 in the area like a city etc, many thanks for any future posts and help

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: How to end a mission
« Reply #1 on: 27 Mar 2009, 00:01:42 »
Hi, in order to end a mission after all your obejctives are finished and or everyone in a city.

It's quite simple. I'll introduce you to a little powerful thing called a "Variable".

A varialbe is just a reference from something else in the game. An example.

Quote
Trigger:
Condition: not (alive soldier1)
On Activation: soldier1dead=true

In that trigger you have created, after soldier one is dead, a variable will be true called "soldier1dead"
The code line in the on activation field:

Quote
soldier1dead=true

Now you may use that variable where you want in the game.

Next: To use with an objective:

Quote
Trigger:
Condition: This (or whichever condition)
On Activation: "1" objstatus "done"; objective1=true

See what that does is it creates a variable called "objective1" after objective 1 is complete.

Lets sa you want to end a mission after objective 3 is complete.

Create trigger:

Quote
Trigger:
Condition: this
On activation: "3" objstatus "done"; objective3Done=true

next:

Quote
Trigger:
Type: End1
Condition: Objective3Done
On Activation: put anything you want here if applicable

See what that does is once the first trigger is activated it creates the variable name "objective3Done"

So there is  brief tutorial on how variables work, if you need any further help feel free to PM me or reply in this topic.

Now we used that variable name in the "condition field of the next trigger.







Who's hyped for Arma4, long live Arma!

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: How to end a mission
« Reply #2 on: 27 Mar 2009, 03:24:37 »
In addition to the variables, the endmissions are accesible in the type field of the trigger feature. Scroll down to where they say end1, end2 or whatever.

So you could place a trigger with a radius large enough to cover the entire map. And have it detect when East is not present. Once all East units are dead, the mission will instantly go to the debrief screen.

To prevent it from going instantly to the debrief screen you can tinker with the time delay feature or implement the variable method above.

« Last Edit: 27 Mar 2009, 04:07:19 by savedbygrace »

Offline zwobot

  • Members
  • *
Re: How to end a mission
« Reply #3 on: 27 Mar 2009, 13:58:28 »
This brings up a question for me too:
Has anyone made a seized by trigger (script) for Ofp like there is in Armed Assault? I want to prevent the search for the last enemy bugger hiding in some bush or wall in a not present trigger...
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline schuler

  • Contributing Member
  • **
Re: How to end a mission
« Reply #4 on: 27 Mar 2009, 14:44:52 »
zwobot thanks for bringing that up,,,,, i would like to know too!
Semper Fi

Offline bakerboy1990

  • Members
  • *
Re: How to end a mission
« Reply #5 on: 27 Mar 2009, 18:02:22 »
wow thanks for all the helpfull info every1, now i can finally make the mission i want, will probaly be back for more questions though :)

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: How to end a mission
« Reply #6 on: 27 Mar 2009, 20:11:17 »
By "seized by" do you mean that one trigger which detects if east is present and when it is down to one or two fellows, the trigger ticks anyways?

Could this not be done with the OR statement?

Code: [Select]
(this) OR (enemycount <=2) Something like that in the condition field? That code is not exact but presses my point anyways.

Offline zwobot

  • Members
  • *
Re: How to end a mission
« Reply #7 on: 27 Mar 2009, 20:34:10 »
I'll try that savedbygrace, thanks for now.

Edit: I've just noticed that enemycount is not a valid scripting command. Shoulnd't it be:
Code: [Select]
(this) OR (count thislist <= 2)2nd Edit: yes it works like above, thanks again.
« Last Edit: 27 Mar 2009, 20:46:10 by zwobot »
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."