OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: DeusRich on 01 Sep 2002, 10:45:28

Title: Reserved Variable
Post by: DeusRich 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:
Title: Re:Reserved Variable
Post by: icarus_uk 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.
Title: Re:Reserved Variable
Post by: KTottE on 01 Sep 2002, 20:09:21
Which is why _time and _player can't be used. Those are script commands as well.
Title: Re:Reserved Variable
Post by: WhisperOFP on 09 Sep 2002, 15:45:19
and _time is the time since the beginning of the script execution, it seems.
Title: Re:Reserved Variable
Post by: occam 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?
Title: Re:Reserved Variable
Post by: Gameer_77 on 09 Sep 2002, 18:15:29
Emm...Yes, yes it is. (http://www.tacnet.org/forum/ikonboard/non-cgi/emoticons/withstupid.gif)

(http://www.tacnet.org/forum/ikonboard/non-cgi/emoticons/lookaround.gif) PEACE