OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: _DaRkMaN_ on 24 Mar 2003, 22:30:49
-
I want a trigger to activate when aP is driving over 1 in speed. i did like this:
In aPs init i wrote this:
speedOfUnit=speed aP
And in a trigger i wrote this in the condition field:
speedOfUnit > 1
but the trigger only got activated if i was driving over 1 in speed directly when the mission started, if I waited some seconds before driving the trigger didnÂ't activate.
Why wont the trigger activate and how should i do to get a thing to happen when aP is driving over 1 in speed?
-
You set the variable speedofunit at a certain point in time - the start of the mission. A variable will keep the same value until you change it.
All you need to do is lose the variable. In your trigger write
speed aP > 1
and it will activate.
PS - if you want a trigger to fire at the very start of mission in the condition field write
true