OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OsamaHunter on 12 Apr 2003, 19:02:33

Title: Timed out missions
Post by: OsamaHunter on 12 Apr 2003, 19:02:33
Yes I am making a mission where you are trying to save some pows but you have a small time window before they are killed and the mission is over. How do I make the AI enemy kill the POW after the time limit is up?
Title: Re:Timed out missions
Post by: dmakatra on 12 Apr 2003, 19:07:34
Let us say u named the executor DaDude and the POW DaGuy. Let us say the time limit is 5 mins.

First, we need to get the 5 mins into seconds. 5 mins = 300 secs. Easy. Now create a trigger, cond field true, on act field DaDude Dofire DaGuy. Now look for the three small boxes that says min, med and max or sumthin like that. Put 300 in everyone of does.
Title: Re:Timed out missions
Post by: OsamaHunter on 12 Apr 2003, 19:17:15
Ok thanks, now I have another question. I need to capture the guys that took the POWs how do I make the AI surrender. I dont want to kill them.
Title: Re:Timed out missions
Post by: Flapje on 12 Apr 2003, 19:36:59
I don't think there is any way to let them surrender, but you could try in a trigger: Activate by whatever you want (west present maybe?). then put

DaGuy setcombatmode "NEVER FIRE"; DaGuy2 same stuff; etc. etc. for every1 you want to surrender.

somebody help out here and tell me what the switchmove command is for the hands behind the head  ::)

Title: Re:Timed out missions
Post by: macguba on 13 Apr 2003, 10:13:48
What you need is a bunch of triggers with setCaptive true/false commands.    

loon1 setCaptive false

Your original POWs are setCaptive true at the beginning of the mission.   When the time limit is up, set them to setCaptive false and the enemy loons will shoot them automatically.

Similarly, you can make loons surrender:  just make them setCaptive true when they detect the enemy, or the enemy get within a certain distance or whatever.  Follow that with making them move towards their captors, say, and perhaps a switchmove.  

For animations see the tute in Pending in the Ed Depot.

Oh, and Osamahunter

Welcome to the forum!
Title: Re:Timed out missions
Post by: OsamaHunter on 13 Apr 2003, 21:02:35
Well thanks. Because I am making a mission using the BAS Delta/Rangers and some other stuff. Its on Nogova mostly the southern part. When I get finished I will post it. I am keeping addons to a minimum for easy play. But I will probably have more questions later.