OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pazuzu on 07 Apr 2005, 03:30:05
-
I'm making a mission in which I have several civilians. I want the mission to end if a certain number of civilians die but I dont want it to be any specific units just a certain number of any civ deaths to end mission.
How would I count how many civilians have died?
Thanks.
-
This can be done via a killed EH and a variable.
In your init.sqs put :
Civdied = 0
Give all civilians a "killed" eventhandler
this addeventhandler ["killed",{civdied = civdied + 1}]
Then your End# trigger
Condition
civdied >= 10
When 10 civilians got killed the mission ends. :)
-
Hey thanks...
This worked perfectly.