Home   Help Search Login Register  

Author Topic: SCUD Launched Veryfication  (Read 1281 times)

0 Members and 1 Guest are viewing this topic.

NecorB

  • Guest
SCUD Launched Veryfication
« on: 30 Sep 2005, 17:35:24 »
Hi!
I need help with creating a script that checks if a scud misile has been launched.
I have this mission where three Scuds are deployed and planing to launch. If anyone of theese three succeds, the mission is going to end.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:SCUD Launched Veryfication
« Reply #1 on: 30 Sep 2005, 20:54:34 »
Hello,

Take a look at the ComRef,

scudState scud

Operand types:
scud: Object
Type of returned value:
Number
Description:
Current state of given Scud launcher. Following states are recognized: 0 - No activity, 1 - Launch preparation, 2 - Launch prepared, 3 - Ignition, 4 - Launched. Note: Non-integral values are used to indicate transition between states.

Example:
scudState scudOne>=4

You can use the result of that command to decide what will happen.
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

NecorB

  • Guest
Re:SCUD Launched Veryfication
« Reply #2 on: 30 Sep 2005, 22:34:38 »
Yea IÂ've seen that allready but cant make it work. First im not 100% sure how (where) to use the line. Second, im getting error messages like, Type bool - expected number, although in the comref it says line is type Number.
I need the "Scudstate" to be reccognized in a trigger so I can end mission when Launched.

Greatful for anymore help.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:SCUD Launched Veryfication
« Reply #3 on: 01 Oct 2005, 02:54:21 »
try

Trigger (any width, just the default options are fine)

Name your scud units, eg scud1, scud2, scud3.

In the activation field, where it says 'this', delete the 'this' and put ' {(scudState _x) > 3} count [scud1, scud2, scud3] > 0 '. Above this field in the trigger, set the delay type as countdown, and the delay max, min, and mid to whatever time period you want the mission to end in once a scud has been launched

Hope it helps

NecorB

  • Guest
Re:SCUD Launched Veryfication
« Reply #4 on: 01 Oct 2005, 12:13:31 »
That did it Fragorl. Problem solved. Thanks alot for help all

 :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SCUD Launched Veryfication
« Reply #5 on: 01 Oct 2005, 16:50:04 »
Good, glad it is all solved......you can press the 'Solve' button now.  8)


Planck
I know a little about a lot, and a lot about a little.