Re: Create_sprite
I want something to happen when Dink kills an enemy that appears like this, in a flash:
int &bonc = create_sprite(314, 219, 9, 531, 1);
sp_nodraw(&bonc,1);
int &flash = create_sprite(314, 219, 7 , 167, 1);
sp_seq(&flash,167);
wait(25);
sp_nodraw(&bonc,0);
wait(50);
sp_script(&bonc, "en-sbonc");
this flash is part of a script that is spawned from ¤t_sprites script. When the spawn is finished and Dink has killed the beast the screen will fade down and a new scene will appear.
int &bonc = create_sprite(314, 219, 9, 531, 1);
sp_nodraw(&bonc,1);
int &flash = create_sprite(314, 219, 7 , 167, 1);
sp_seq(&flash,167);
wait(25);
sp_nodraw(&bonc,0);
wait(50);
sp_script(&bonc, "en-sbonc");
this flash is part of a script that is spawned from ¤t_sprites script. When the spawn is finished and Dink has killed the beast the screen will fade down and a new scene will appear.
So, what's your problem? Call me an arse if you said it, but I didn't understand.
When Dink kills that enemy that was created by the script. I want something to happen. In this case the screen fades down, draws on another screen and fades up on that screen. If I just put fade etc. after this script, they'll be executed directly and Dink will not have time to kill the Bonca.
I'm still not sure what you exactly meant, but I'll try my best to help.
If I understood you right you must put "spawn("thescriptsnamehere")" to the void die(void) of the monster and then put the screen changing into the script you just made it to spawn.
If I understood you right you must put "spawn("thescriptsnamehere")" to the void die(void) of the monster and then put the screen changing into the script you just made it to spawn.
Hm, put the fading etc. to the monsters void die. Sounds plausible. Gotta try it in action.
Yes, that is another way. But it is not as certain to work.
Use the die() procedure to let the engine know what will happen when the sprite dies. But it can't be too long so use the spawn() function like Skull said.