OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Guerillasmurf on 27 Nov 2005, 22:13:43
-
Hi
I am fairly new in editing and need some help with this little problem..
I have a fire with some soldiers around it at an LZ. If player (Spec-Op) decides to kill the soldiers and put out the fire I would like someone to check it out.
This is the idea: on the road nearby where the fireplace is, UAZ/trucks/BMP's are driving by on a regular basis. If the fire then is out (and its not supposed to be) then something is wrong and the UAZ or what I decide it to be, will go check out what happened.
Now I can get a UAZ to drive back and forth with move/cycle waypoint. Also I have a trigger with axis 20x20, activation East present, condition !(inFlamed fire1). The trigger is synced to the cycle waypoint for the UAZ. The trigger is placed on the road so the UAZ can't miss it.
If I then put out the fire then the UAZ immediatly drives to the seek and destroy WP i placed at the fire... But that action must first happen when the UAZ is in the triggers axis.. Hope you understand my meaning.
How do I realize that??
Best regards
Guerillasmurf
-
You'll need an additional condition for the trigger:
!(inflamed fire1) && (UAZname in _thislist)
_thislist is an array containing any units within the trigger area that can activate it.
-
Ah okay
Sounds great.. I will test it when I get home from work. Thanks for the help..
Br
Guerillasmurf
-
Hmm
If I add
&& (UAZ1 in _thislist)
I get an error message saying "Local variable in global space"
It is something in the array thats not right.. But what??
br
Guerillasmurf
-
That's because you can't use local variables in triggers, only in scripts.
Try list this instead.
-
Ehh..
I guess im really stupid in this. :-[
It gives an error message also... &&(UAZ1 in list this) but that is not rigth either.
-
Ok try naming the trigger trig1 and then try in list trig1.
-
i thought it was one word also
either try
&& (UAZ1 in thislist)
or try
&& (UAZ1 in listthis)
i think the first one is correct but may not be im pretty vertain its all one word
-
thisList (http://www.ofpec.com/editors/comref.php?letter=3#Triggers)
-
Whoops. Sorry, don't know how that underscore snuck in there. :-[
-
Oh sorry i got it backwards.
Gotta get back to mission editing so i remember stuff like that.
-
yeah now its working:
! (inFlamed fire1)&& (UAZ in list Trig1)
Now the UAZ is driving back and forth and when the fire is put out and it reaches the trigger then its taking on the destoy WP.
Thank you all for your help.
BR
Guerillasmuf
-
you could have saved a lot of trouble and just group the trigger to the uaz, and set the activation to present and your inflamed thing
-
Lol! You got us all there Triggerhappy ;D
-
Ohh.
Right.. I saw that one late last night when reading through a tutorial.
BR
Guerillasmurf