OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: duexmad on 13 Mar 2003, 02:43:08
-
Hello all,
I am trying a make a map where a soldier is parachuted and needs to land at a DZ (Drop Zone).
Now the 'problem' is this;
The Trigger will go off, if a 'west' unit (i.e. soldier under canopy) hits it while in the air. (even with the F2 mouse drag)
I need a trigger to detect it once the soldier in on the ground and not in the air.
Is that possible???
Thanks in advance.
-
hmm..
experiment with the canstand commad and if that doesn't work
_soldier = _this select 0
#height
_height = getpos _soldier select 2
?_height < 2: goto "activate"
~1
goto "height"
#activate
type here a condition to activate the trigger
exit
activate the script by typing [soldiername] exec "scriptname.sqs"
-
Dear Artak,
Thank you!
I will check it out and post the results here ASAP.
Also, at the '#activation'
Could I type this in?
_vehicle == player
(To detect once the player is out of the chopper)
Thanks again!
-
You donÂ't have to script ;).
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=6869
-
Tried that , Armstrong :D
? (getPos this select 2 < 40) and (getPos this select 2 > 25):trigger1=true
But, gave me some weird error message (not so 'weird for you guys').
basically it is saying that the '?' is "Invalid Number in expression"
'|#|? (getPos this select 2 < 40) and (getPos this select 2 > 25):trigger1=true :Error Invalid Number in expression
I have placed that line on the 'Condition' and on the 'On Activation' no luck.
What am I doing wrong? I know it has to be something with the '?' mark (?)
:-\
-
You can't have ? in a trigger.. *cough*
The triggers condition line has a 'build-in' ?-mark in it.
-
Well, Armstrong suggested that you don't have to script
but the command he gave you does only work in scripts :)
If you want to use this in a trigger, you need to cut it into
two parts:
condition:
(getPos soldier select 2 < 40) and (getPos soldier select 2 > 25)
onActivation: trigger1=true
~S~ CD
-
Thanks guys got it figured out.
Thanks again
::)
-
just put this In the CONDITION field of the trigger:
This AND (getpos UnitName select 2 < N)
Then the trigger will fire when the unit is present, and "N" meters or less above the ground.
Hope this helps you