To begin with, I know it's possible to use SetEncounterActive( TRUE/FALSE ) to control whether an encounter will actually spawn when the trigger is entered. I've done this successfully through area-OnHB but I want to create a more generic script that can be applied to any area/encounter set.
One of the ideas I've played around with is having the area OnHB retrieve a waypoint I paint; the waypoint would have the same tag in all areas that this applies to. I would designate the tag of the encounter(s) as a variable on the WP, allowing the area to retrieve the appropriate encounters. This would be necessary because GetFirstObjectinArea does not allow an OBJECT_TYPE* filter for some reason, and I wouldn't want to iterate through all objects in the area just to retrieve the encounters. Any shortcuts here?
I also played around with the encounter events, primarily OnEnter and OnHeartBeat. I don't fully understand these, so input from anyone who has more info would be very welcome.
One of the things that I tested is when the encounter OnEnter is fired. From testing, it seems that if an encounter is entered while inactive, it will not spawn even if the OnEnter sets it to active (though it will the next time)--the potential spawn happens before the OnEnter. The opposite didn't seem to hold: when the encounter was entered while active and the OnEnter set it to inactive, the spawn did not happen.
I had a really hard time figuring out when the encounter OnHB was firing. It seemed to be firing only while actually standing within the trigger, but it also seemed that whether the encounter was active may have affected this. I'm not really methodical enough to figure this out.
I suspect that some of the spawning systems (MPWC, etc.) may address this, but I'm not looking at those at this time.
Modifié par MasterChanger, 12 août 2010 - 05:03 .





Retour en haut







