OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trash Can Man on 01 Mar 2005, 08:46:42
-
I'm working on a hostage rescue mission. The way I have it setup at the moment is that if any of the prisoners gets killed, the mission will end in failure. this is nice and all but my problem is even after I secure the prisoners, the mission still ends in failure. What I would like to know is how would a trigger know if the prisoner is secure and to let the mission continue. I hope this makes sense...it does in my twisted mind! ;) thanks guys!
Regards,
Trash Can Man
-
If I understand you correctly you could use a global variable eg:
captivesSafe = false
and then set it to true when they are safe and don't let the mission and in failure if it is true. In otherwords the trigger that activates the failed end of mission should have the condition:
this and (whatever else you want ) and not captivesSafe
-
Hi TCM
II'm no trigger expert but try this -
Place a Trigger covering the hostages with the following features -
Type = End #1
Activation = "West Present" (or whatever side are the rescuers)
Condition = (!alive hostage1) || (!alive hostage2) . . .
What this should do is check to end the game as soon as the rescuers burst int to the area with the hostages. If any one of them is dead then the mission will (should !) end.
Is that what you were looking for ?
roni
-
it might be easier to help if we knew exactly what the mission deems necessary for the hostages to be "safe". Is it that they are simply alive (as demonstrated above) or something else such as their movement to a safehouse or the killing of their guards? The best solution can be found with the precise details but it will inevitably involve the use of a global variable (as the guys above have shown).
-
ok...let me give you an overview of what my mission is like. It's a night time covert ops mission where 12 hostages are being held in 4 different towns on the island. There will be 6 black ops but not as a group. what happened when my friend and I ran my beta version, he inadvertly killed all the hostages (allied officers). So, what i am looking for is a way to end the mission if any 1 of the hostages get killed; but I want to mission to continue if they are still alive when we reach the extraction point. I hope this helps...
Thanks everyone!
Regards,
Trash Can Man
-
Try this:
In init.sqs put
hostageKilled = false
{_x AddEventHandler [{killed}, {hostageKilled = true}]} forEach [hostage1, hostage2....]
(where hostage1 etc are the names you have given to the hostages in the editor)
Have a trigger that causes the mission to end in failure and has the condition field:
hostageKilled
-
Ok....ill give that a try...thanks a bunch guys I appreciate your help as always!
Trash Can Man
-
Try this:
In init.sqs put
hostageKilled = false
{_x AddEventHandler [{killed}, {hostageKilled = true}]} forEach [hostage1, hostage2....]
(where hostage1 etc are the names you have given to the hostages in the editor)
Have a trigger that causes the mission to end in failure and has the condition field:
hostageKilled
This is axactly what i was looking for!!! Thanks again Hobson....your the man!!
Regards,
Trash Can Man
-
You are very welcome