06-14-2010, 12:23 PM
With "APM_RESET_SELF_SWITCHES=true" the self-switches of the generated events will be reset upon their generation. However that happens only when the populate function is used, not when the other ones are (populate_area, populate_area_2, populate_area_3 and so on). If you are using only the other ones, you won't see any effect and the self-switches will keep their previous value.
Self-switches are a little tricky, because they are not stored within events, but instead there's a global array for them.
This can be good in a simple situation, as for example lets you do things with this script as controlling the number of monsters that are alive in a map, by keeping a self-switch set indicating that a monster is dead. That monster will be generated dead. This is under the assumption that the events will always take the same IDs, which correspond with the indexes in the self-switches array.
But, if for some reason the IDs/indexes of some events change, because the order in which they are generated changes or I don't know why, then their self-switches will get the values that before belonged to the events with the new indexes, causing a total mess.
Self-switches are a little tricky, because they are not stored within events, but instead there's a global array for them.
This can be good in a simple situation, as for example lets you do things with this script as controlling the number of monsters that are alive in a map, by keeping a self-switch set indicating that a monster is dead. That monster will be generated dead. This is under the assumption that the events will always take the same IDs, which correspond with the indexes in the self-switches array.
But, if for some reason the IDs/indexes of some events change, because the order in which they are generated changes or I don't know why, then their self-switches will get the values that before belonged to the events with the new indexes, causing a total mess.