Home   Help Search Login Register  

Author Topic: Proper use of Call?  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Proper use of Call?
« on: 11 Feb 2003, 18:53:17 »
Hey folks,

I have the following line of code in one of my scripts:

_aircraft addEventHandler ["IncomingMissile", "(call {""_unit""}) vehicleRadio ""incoming"""]
 


Where:

* _aircraft is the aircraft object that _unit has boarded.
* _unit is the player object.
* "incoming" is a radio message and sound that plays when _unit is targeted by a missile.

I have discovered that you cannot use a local variable in an event handler, so I'm attempting to pass the value of _unit, not _unit itself, to the event handler.

Is the above syntax correct?  Is that proper usage of call?

Thanks.
Ranger