OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 23 May 2003, 01:38:33

Title: deleting triggers
Post by: gadolinite on 23 May 2003, 01:38:33
how would you delete a trigger during gameplay with the activation of another trigger?
Title: Re:deleting triggers
Post by: macguba on 23 May 2003, 02:13:15
I don't think you can delete triggers.    By which I mean of course that I don't know how to do it.

However, you can move them.    And you can control whether they operate or not by means of variables.    What you are basically asking is, "how can I stop a trigger from firing if another trigger has already fired" and that is a classic case where variables are ideal.

I've already written a post about this today so have a look at that.   If  you're not clear what to do say so and I'll explain again.
Title: Re:deleting triggers
Post by: gadolinite on 23 May 2003, 02:30:46
I asked because I need that alarm to turn off.  I posted something else, but it does not fit my situation.  (See the posting 'Light Post Alarm')

My situation:
    The condition for the trigger (one detected by east and activated by resistance) is something different, so I set this trigger up so it fires another trigger in addition to it's task (fueling enemy choppers).
    This other trigger (a switch) has the alarm sound effect.  So when that light pole is destroyed, the trigger1 variable is set to false.  :'(This does not shut off the alarm.  In the condition field of the switch I put 'alarm1 && (getdammage object 124444) < 0.9'.  
    The alarm sounds, but when I blow the light pole to kingdom come, it is still sounding.  Both of the triggers are activated repeatedly.  The one (detected by east and activated by resistance) is met to only be activated once.   ??? ??? What is up here??? ?????
Title: Re:deleting triggers
Post by: Mujahedeen on 23 May 2003, 04:58:08
Hi!

If you give the alarm trigger a name, you can use the deletevehicle command to delete the trigger....

Code: [Select]
deletevehicle <triggername>
...in the On Activation line for the other trigger...

cheers...

Title: Re:deleting triggers
Post by: gadolinite on 24 May 2003, 19:27:09
 ???I even tried this
Title: Re:deleting triggers
Post by: Mujahedeen on 25 May 2003, 04:15:22
Hi!

I made a sample "mission", you CAN use deletevehicle <triggername> to delete triggers... just have a look at the attachment!   - The only thing was that I found it extremely hard to destroy the lightpole w/speakers, (3 satchel didnt even do the job)...  :)

cheers!
Title: Re:deleting triggers
Post by: macguba on 25 May 2003, 11:22:54
The way to destroy the lamppost is like this

Condition:   getdammage lamppost > 0.1
On Activation:  lamppost setdammage 1

You can experiment to discover the number of satchels you feel is right in the mission.