Author Topic: disable triggers questions  (Read 357 times)

Legacy_harjoblog

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
disable triggers questions
« on: August 07, 2012, 09:19:57 am »


                Is it possible to disable or destroy a trigger through scripting? I've tried DestroyObject "tag of object" and that doesn't seem to work.

Here is my scenario:

player(s) clear a dungeon, when they kill the last mob a localint "templecleanse" is set to 1, and a journal entry is updated. These two things I have put in the OnDeath of the Creature. WHat I want to happen next is 3 encounter triggers in this zone and 6 in another zone destroyed. I'm just not really sure if those triggers can be destroyed or disabled. I've set them to oneshot triggers, but I'd rather have them respawn until the very last mob is killed.
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
disable triggers questions
« Reply #1 on: August 07, 2012, 12:39:12 pm »


               You could set a local on the module of zero and as long as it is zero the triggers are active, upon the death of the final critter the int is reset to one. Just have the onenter of the trigger check the int on the module.
               
               

               
            

Legacy_harjoblog

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
disable triggers questions
« Reply #2 on: August 08, 2012, 04:33:38 am »


               I'll try that.
               
               

               
            

Legacy_eeriegeek

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-0
disable triggers questions
« Reply #3 on: August 08, 2012, 06:03:30 am »


               Setting the encounter's spawn max to zero also seems to work. (Infinity is -1)

SetEncounterSpawnsMax(0,oEncounter);
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
disable triggers questions
« Reply #4 on: August 08, 2012, 07:14:37 am »


               If he is asking about an encounter?  Then  SetEncounterActive(FALSE)   would work.

For Triggers Yes You can destroy them.   But Baragg's way would be the way to go.