Spawn condition confusion
I would like a quick check of my understanding before I spend any time going down this road. I would like to be able to turn a spawn group on and off within a quest. For example spawning mobs when players get near an area. (The mobs should respawn, otherwise it would be straightforward).
Spawn conditions seem to apply to spawn points although it looks like a coordinate can be used for multiple spawn2 entries (one per spawn group). OK, so create spawn2 entries for each possible spawn point and assign a condition id (which I assume is _condition).
Then when a script decides to enable the spawn group use quest::spawn_condition to change the condition value, likewise when disabling the spawn group.
I'm definitely not clear on how the spawn condition values are used. I am guessing that if the current value of the condition is 1 then the spawn2 entry is used, and if it is 0 then it is skipped. The version of the database that I am using only has two entries for spawn_events, but I am guessing here that the argument field is the new value for the condition.
But if that is the case, what is the purpose of the "enabled" field in spawn2? Could one not just flip enabled?
I thought that looking at Kithikor would clear some things up, but spawn_events are not used there (rather timers in Perl).
|