Monster spawning
If I create a monster by script. How can I make it so that it doesn't spawn after I kill it?
I'd use a global variable
for example &dead and have the default as 0
and have it in the spawning script like:
if(&dead == 0)
{
create_sprite( <blah blah blah> )
}
then in the monsters script under the die procedure just set &dead to 1
Voila! no more respawning
for example &dead and have the default as 0
and have it in the spawning script like:
if(&dead == 0)
{
create_sprite( <blah blah blah> )
}
then in the monsters script under the die procedure just set &dead to 1
Voila! no more respawning
No, I think there's much easier way. I might know it, but I just don't want to test it so I don't screw up anything.
The method Flood mentioned is probably the most easy to use. The obvious disadvantage is that it costs you a global. Though this shouldn't worry you too much for a small DMOD.
There might also be other ways, but that depends on how you spawn the monsters exactly. You could work with editor frames or editor sequences if the script used to spawn the monsters is attached to a sprite that is placed in the editor.
There might also be other ways, but that depends on how you spawn the monsters exactly. You could work with editor frames or editor sequences if the script used to spawn the monsters is attached to a sprite that is placed in the editor.