Home   Help Search Login Register  

Author Topic: Setting variables within an addon  (Read 1042 times)

0 Members and 1 Guest are viewing this topic.

Deepsmeg

  • Guest
Setting variables within an addon
« on: 28 Dec 2004, 12:05:15 »
I'm editing the bas scud to fire nuclear warheads, and to make it go off if the scud is destroyed. (And yes, I am crediting them for the script)
So far so good.

The problem I've got is tracking whether the ordnance has already been fired: I do not want the empty launcher to go nuclear.

The way that has been suggested is that we set a variable within the mission, and use triggers. That would work if we wanted to have it do something after it has been fired.

What I'm planning on doing is to set a variable within the addon to true when the user selects "Launch scud at target" from the action menu, and then later refer to it from the script attached to the killed eventhandler:
Something simple along the lines of
?blNukedFired: _nuke = "CoC_ShkvalNuc" CreateVehicle GetPos _object

The problem is I'm unsure as to how to declare this variable within the addon, when conceivably there could be 38 of these things on a level.
« Last Edit: 28 Dec 2004, 12:09:02 by Deepsmeg »