- Joined
- Jul 24, 2015
- Messages
- 40
- Reaction score
- 1
- First Language
- English
- Primarily Uses
Hello so i'm making a game where you can fight enemies, and then after a certain amount of time they respawn.
Now my friend and I (mostly him) wrote a ruby script that allowed us to have that event respawn, through an event call.
But we need to only respawn the event if the event has been erased.
We tried this...
if $game_map.events[3].erase
$game_map.respawn_event(3)
end
$end
now the respawn event works. But what happens is instead of checking if the event has been erased. It just completely erases it. which confused both of us.
we also tried $game_map.events[3].erase = true and $game_map.events[3].erase?
but obviously those did not work.
If anybody knows how to do this I would be so grateful! HERE is the script we (mostly him) wrote.

Now my friend and I (mostly him) wrote a ruby script that allowed us to have that event respawn, through an event call.
But we need to only respawn the event if the event has been erased.
We tried this...
if $game_map.events[3].erase
$game_map.respawn_event(3)
end
$end
now the respawn event works. But what happens is instead of checking if the event has been erased. It just completely erases it. which confused both of us.
we also tried $game_map.events[3].erase = true and $game_map.events[3].erase?
but obviously those did not work.
If anybody knows how to do this I would be so grateful! HERE is the script we (mostly him) wrote.
