|
Post by Prominence on Mar 19, 2005 14:23:40 GMT -5
I'm making overworld rooms persistant. When you collide with an enemy you go to a battle room. When I return, how do I make the enemy I just went to battle with execute a script? (well, just change sprite then die) and not every other enemy?
|
|
|
Post by IsmAvatar on Mar 20, 2005 14:54:29 GMT -5
you could store its ID in a global variable. then when you return, if you killed it, destroy the object with id of the global variable.
|
|
|
Post by Prominence on Mar 20, 2005 19:53:40 GMT -5
well, after spending over 3 hours I managed to get a too complicated ID thing working.
|
|
|
Post by IsmAvatar on Mar 21, 2005 15:00:52 GMT -5
it should be somewhat complicated, but not overly complicated. I'd think a simple on collision, set variable, set alarm, and go to room. On alarm (this occurs once it returns), check the results of the battle; if won, destroy object with id of variable with (global.battlewith) { instance_destroy() }
|
|