Aller au contenu

Photo

Conditionally preventing encounter triggers?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Curious if this can be done? 

 

I have an encounter trigger, spawns a few creatures. I also have an item the PC party can pick up that, if carried on the, I want to prevent the encounter from triggering. 

 

I thought I could handle this with an OnEnter script for the trigger, and check the inventory of the party, and then call MarkAsDone() and have the encounter not fire. But alas, it doesn't seem to work that way. I have debug writelines and I can see my OnEnter script firing, and I can see that the item is found in the inventory of one of the party, but the trigger fires no matter what. 

 

I'm sure the way to get around this is with a generic trigger that does the checking, and then it fires the encounter if it needs to (and thus the encounter trigger has to be off the walkmesh somewhere where it can't get triggered at all). But I was curious if there was a more straight-forward method I'm missing. 



#2
Tchos

Tchos
  • Members
  • 5 030 messages

Make the item acquire script fire SetEncounterActive(int nTrueFalse, object oEncounter); setting it to FALSE.  Make the item unacquire script set it to TRUE.


  • ColorsFade aime ceci

#3
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Ah, very good. Thanks Tchos.