The Dink Network

sp_kill_wait() - broken?

March 18th, 05:08 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Maybe this is just Dink Smallwood HD but the command

sp_kill_wait(sprite);

doesn't seem to really do what it is supposed to, which is don't wait for anything for that sprite - usually number 1, Dink, and is usually used in magic or item scripts for spells or weapons animations.

sp_seq(1, &basehit);
sp_frame(1, 1); //reset seq to 1st frame
sp_kill_wait(1); //make sure dink will punch right away
sp_nocontrol(1, 1); //dink can't move until anim is done!
 &magic_level = 0;
 draw_status();
 &mholdx = sp_x(1, -1);
 &mholdy = sp_y(1, -1);


But I've noticed sometimes that the missile sprite is created and off flying before the magic/hit animation even starts. This anomaly doesn't occur every time, but enough to be annoying.

I don't remember seeing this in the old game engine, but maybe it was there back 20+ years ago.

Or maybe it's my scripts, but I'm pretty sure I've seen this with the standard fireball magic, which I haven't changed.
March 18th, 11:37 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
Not sure if the bug you mentioned is indeed DinkHD specific, but I believe it might have been fixed in TheNewGuys script improvement pack. Might wanna test that(I think it's a small demo mod so you can test it without replacing the scripts in your Dmod), and check if it is indeed fixed. Then can just grab whatever it change he made to fix it. I recall thenewguy saying he fixed a delay that shouldn't be there with animations and such.
March 18th, 06:37 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Thanks, I think that fixes it... well for me at least with item-fb.c as I can easily add x3 new global variables for the script to work and add the new improved fireball spell script without any impact.

My other scripts are a bit of a mess, so not sure if I want to mess with them, but I will see in the final test/run through I plan to do for the ReDux version of SOB before its release in the next week or so.

I also noticed on Seth's website that HD version of the engine now supports 1300 sprite slots and unlimited SET_SPRITE_INFO lines, which is nice to know.
March 18th, 10:33 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
Funny thing is a while ago I tested spawning a sprite in main.c to use init to declare a bunch more set_sprite_info lines and it seemed to work with no issues. Just couldn't have extra ones over the limit in dink.ini or they were ignored. Lol.