OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pooj on 21 May 2005, 12:01:13

Title: Problem with triggering air units.
Post by: Pooj on 21 May 2005, 12:01:13
I'm busy with a simulation (by camera) of an total war. The operation starts with an air strike (tomahawks, F117, B2 etc.). Now the problem, after a successfull tomahawk attack I want the F117's to attack an other target, in the same map. Both the scripts work perfect if they aren't in the same map, but the problem is the F117's are already flying, so I can't freeze them or something like that. Is there something to solve this problem?
Title: Re:Problem with triggering air units.
Post by: Planck on 21 May 2005, 12:34:15
Pooj, I suggest you post your scripts here so others might look and see any possible problems.


Planck
Title: Re:Problem with triggering air units.
Post by: Uldics on 21 May 2005, 15:45:04
I placed my planes in a far corner in some woods, setfueled them to 0, so they cant move. When I wanted them to get busy, I setposed them in previous location, but several hundreds meters up in the air, setfueled to 1. And off we go - they fly to their first waypoint.
Title: Re:Problem with triggering air units.
Post by: Pooj on 21 May 2005, 16:13:03
That sounds very logical, thank you, I will try that.

Thank you!
Title: Re:Problem with triggering air units.
Post by: Pooj on 29 May 2005, 11:15:19
I can't figure out how it should work, I placed in my cutscene script after the cam effect something like setfuel 1  en setpos but somehow the planes fly to their waypoint before the cutscene ended. By the way I set the fuel the 0.

Ho can I make the planes wait to fly away after the cam effect?
Title: Re:Problem with triggering air units.
Post by: 456820 on 29 May 2005, 11:20:51
how about just create the plane with full ammo, full fuel etc...
Then in the script have something like
Code: [Select]
[] exec "loop.sqs"then create a loop.sqs file and in that put the following

Code: [Select]
#loop
plane_name setpos getpos GL1
? planego : #exit
~1
goto "loop"
#exit
EXIT

That should be correct basically create a game logic and name it GL1 where ever you want the plane to stay then when you want it to start mving in the first script (the cutscene one) put planego = true and the planes should go to their first waypoint staright away.