Home   Help Search Login Register  

Author Topic: lunch a script by the name of the unit.?  (Read 1088 times)

0 Members and 1 Guest are viewing this topic.

Offline sfc.itzhak

  • Members
  • *
lunch a script by the name of the unit.?
« on: 19 Nov 2007, 18:48:31 »
hey all

wanted to ask is it possible to get the name of a unit like if i name it tank18 and i want
to make an init event that it will take the name and compere it to names in the sqs and
will apply other scripts by it.

to clarify :

i place a tank and name it tank18

the script need to read the units name and apply the other script which is assigned to the name tank18

thanks for the help.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: lunch a script by the name of the unit.?
« Reply #1 on: 19 Nov 2007, 20:08:09 »
Umm. The clarification didn't help me very much  :D Maybe give us a more practical example? What are you trying to do with "tank18" exactly? What scripts are you using? Right now I don't think I can be of much help as it is.  :dunno:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: lunch a script by the name of the unit.?
« Reply #2 on: 19 Nov 2007, 20:44:43 »
This command might help: _vehiclename = vehicleVarName (vehicle player);
_vehiclename is returned as string.