Home   Help Search Login Register  

Author Topic: Reserved Variable  (Read 1297 times)

0 Members and 1 Guest are viewing this topic.

DeusRich

  • Guest
Reserved Variable
« on: 01 Sep 2002, 10:45:28 »
ok, I hardly know any reserved variables, and I hate the line 'reserved variable in expression' so  invite everyone to put any reserved vars in here. The only two i know are:
_time       = time since script started
_player     = player unit

hmmm, if there are already some of these posts sorry because i searched and i thought this would be useful so dont kill me... :beat:

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Reserved Variable
« Reply #1 on: 01 Sep 2002, 20:06:33 »
The ones you cant use are the names already given to units, actions, animations, and scripting commands.

So you cant call your parachute guy "para" because that name is already given to the animation name for parachuting.  Similarly you cant call your variable _distance because that is a scripting command.

In all in all there are hundreds of reserved variables, all of which are names or commands already in the game.

Offline KTottE

  • Former Staff
  • ****
Re:Reserved Variable
« Reply #2 on: 01 Sep 2002, 20:09:21 »
Which is why _time and _player can't be used. Those are script commands as well.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline WhisperOFP

  • Members
  • *
  • I'm a llama!
Re:Reserved Variable
« Reply #3 on: 09 Sep 2002, 15:45:19 »
and _time is the time since the beginning of the script execution, it seems.

occam

  • Guest
Re:Reserved Variable
« Reply #4 on: 09 Sep 2002, 16:43:16 »
So if time returns the elapsed time in seconds since the mission began, it makes sense to me that the local variant _time would be elapsed time since script began. Is this the case?

Gameer_77

  • Guest
Re:Reserved Variable
« Reply #5 on: 09 Sep 2002, 18:15:29 »
Emm...Yes, yes it is.

PEACE