OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: occam on 09 Sep 2002, 15:30:38
-
I was pawing though the scripts.pbo and noticed that a couple of the scripts have a line like:
&2
or
&3
The rest of the commands made sense to me, but I can't find any reference to this in any text or tutes. Anyone know what it does?
-
It means "when the time reaches the specified time, go on."
&3 means @_time >= 3
or in english: "When the variable '_time' is equal to or greater than 3, go on."
Every time you start a script, a local variable called _time is created. It counts up from zero when the script starts and keeps track of how much time the script has run.
Here is a blurb about it in the official command ref:
Waiting for a time: line starting with '&'.
Example: &endTime is equivalent to @_time >= (endTime)
When they say "endTime" they are expecting you to assign a number to it.
-
Aha! Very Handy.
Thank you for the clear and concise info.