OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Guerillasmurf on 27 Nov 2005, 22:13:43

Title: Trigger on inFlamed
Post 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
Title: Re:Trigger on inFlamed
Post by: LoTekK on 27 Nov 2005, 22:27:09
You'll need an additional condition for the trigger:

Code: [Select]
!(inflamed fire1) && (UAZname in _thislist)
_thislist is an array containing any units within the trigger area that can activate it.
Title: Re:Trigger on inFlamed
Post by: Guerillasmurf on 28 Nov 2005, 09:34:51
Ah okay

Sounds great.. I will test it when I get home from work. Thanks for the help..

Br
Guerillasmurf
Title: Re:Trigger on inFlamed
Post by: Guerillasmurf on 28 Nov 2005, 16:46:36
Hmm

If I add
Code: [Select]
&& (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
Title: Re:Trigger on inFlamed
Post by: Dane on 28 Nov 2005, 17:10:00
That's because you can't use local variables in triggers, only in scripts.

Try list this instead.
Title: Re:Trigger on inFlamed
Post by: Guerillasmurf on 28 Nov 2005, 18:14:41
Ehh..

I guess im really stupid in this. :-[
It gives an error message also... &&(UAZ1 in list this) but that is not rigth either.

Title: Re:Trigger on inFlamed
Post by: Dane on 28 Nov 2005, 18:21:59
Ok try naming the trigger trig1 and then try in list trig1.
Title: Re:Trigger on inFlamed
Post by: 456820 on 28 Nov 2005, 18:25:15
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
Title: Re:Trigger on inFlamed
Post by: macguba on 28 Nov 2005, 18:26:12
thisList (http://www.ofpec.com/editors/comref.php?letter=3#Triggers)
Title: Re:Trigger on inFlamed
Post by: LoTekK on 28 Nov 2005, 18:27:58
Whoops. Sorry, don't know how that underscore snuck in there. :-[
Title: Re:Trigger on inFlamed
Post by: Dane on 28 Nov 2005, 18:30:11
Oh sorry i got it backwards.
Gotta get back to mission editing so i remember stuff like that.
Title: Re:Trigger on inFlamed
Post by: Guerillasmurf on 28 Nov 2005, 18:42:03
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
Title: Re:Trigger on inFlamed
Post by: Triggerhappy on 28 Nov 2005, 22:44:41
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
Title: Re:Trigger on inFlamed
Post by: Dane on 28 Nov 2005, 23:27:38
Lol! You got us all there Triggerhappy ;D
Title: Re:Trigger on inFlamed
Post by: Guerillasmurf on 29 Nov 2005, 08:54:18
Ohh.

Right.. I saw that one late last night when reading through a tutorial.

BR
Guerillasmurf