OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Semedar on 28 Dec 2009, 22:29:27
-
Can anyone help me out how to script my mission so when you kill a civilian (Just one) you complete the mission and it ends?
And if possible, how to make it when you kill the civilian a sound plays then the mission ends.
Anyways thanks for reading :)
My mission:
Kill the civilian thats surrounded by bunch of OPFOR in a heavily wooded area to complete the mission.
-
Does civilian have to move around?
If not, it is this simple:
Put a trigger in are the civilian would be present, size whatever you want, activated by civilian, once not present.
In type of the trigger select "End 1", and put whatever time delay you want.
And also, :welcome: to OFPEC!
-
Hah, that easy huh? :D Thanks for the help, and I've came to this site plenty of times before to look at scripts and what-not, just not ask for help. ;) But thanks! :)
-
Another solution is to have in the condition field of a trigger the following:
!alive unitName
If dead, the trigger will, well.. trigger! :scratch:
It can be size 0 x 0 and doesn't need to be activated by anyone. It can have the End #1 selected with the delay as mentioned in the above post which is still a method of doing it but if they do happen to move around then it could help soemone else looking for an answer :)
-
Aye, thanks for the tip. :) It'll come useful for some people I'm sure. Thanks. :)
Edit: Is it possible to have more than one unit in the condition field? Say when you kill two people (Bob, Joe) then the trigger activates.
-
Maybe
!alive Bob && !alive Joe
In condition field would work?
-
Yep you can use the above example if you want it to trigger when they are both dead. You can also do it so only one of the two has to die for it to trigger.
!alive Bob || !alive Joe
With that, only one of them have to die for it to trigger. Might come in handy.
-
Aye, thanks for the help! :)