Hi, some time ago I was looking for a way to create events with opponents that rise again some time after the battle and I implemented everything with the code that was advised to me here:
first thread
So now my encounters consist of 3 pages that looks like this:
var key = [this._mapId, this._eventId, "A"];
$gameSelfSwitches._data[key] = $gameVariables.value(82) + 5;
(variable 82 is my respawn clock timer)
$gameVariables.value(82) >= $gameSelfSwitches._data[[this._mapId, this._eventId, "A"]]
And it works great, when you defeat the enemy, it will lie on the ground for around a minute and then stand up again, but there is one problem. Like I said in the previous post, I need a special "tombstone" event that will trigger a specific switch that disables the respawn of the enemies (activates the third blank event page for all of them).
But for some reason, It doesn't work as it should. Sometimes when the switch is activated, all events with enemies go to page 3, and sometimes even after the switch is activated, all enemies remain active.
So, my question is, can the following code somehow toggle the switch? The thing is that when I activate the switch all the events with the enemies should immediately go to a third blank page, but for some reason, it does not always happen and it's strange.
first thread
So now my encounters consist of 3 pages that looks like this:
var key = [this._mapId, this._eventId, "A"];
$gameSelfSwitches._data[key] = $gameVariables.value(82) + 5;
(variable 82 is my respawn clock timer)
$gameVariables.value(82) >= $gameSelfSwitches._data[[this._mapId, this._eventId, "A"]]
And it works great, when you defeat the enemy, it will lie on the ground for around a minute and then stand up again, but there is one problem. Like I said in the previous post, I need a special "tombstone" event that will trigger a specific switch that disables the respawn of the enemies (activates the third blank event page for all of them).
But for some reason, It doesn't work as it should. Sometimes when the switch is activated, all events with enemies go to page 3, and sometimes even after the switch is activated, all enemies remain active.
So, my question is, can the following code somehow toggle the switch? The thing is that when I activate the switch all the events with the enemies should immediately go to a third blank page, but for some reason, it does not always happen and it's strange.