Home   Help Search Login Register  

Author Topic: Problem with triggering air units.  (Read 1024 times)

0 Members and 1 Guest are viewing this topic.

Offline Pooj

  • Members
  • *
  • Royal Netherlands Army
Problem with triggering air units.
« 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?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Problem with triggering air units.
« Reply #1 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
I know a little about a lot, and a lot about a little.

Uldics

  • Guest
Re:Problem with triggering air units.
« Reply #2 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.

Offline Pooj

  • Members
  • *
  • Royal Netherlands Army
Re:Problem with triggering air units.
« Reply #3 on: 21 May 2005, 16:13:03 »
That sounds very logical, thank you, I will try that.

Thank you!

Offline Pooj

  • Members
  • *
  • Royal Netherlands Army
Re:Problem with triggering air units.
« Reply #4 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?

Offline 456820

  • Contributing Member
  • **
Re:Problem with triggering air units.
« Reply #5 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.