The Dink Network

Reply to Re: sp_kill_wait()

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 7th 2013, 09:07 PM
goblins.gif
I DID IT!

All I had to do was set Dink's direction to what it already was at the beginning of the script.
Which properly resets the animation, in ways that sp_frame and sp_seq do not do, and for the purposes of the attacking script seems to do exactly what sp_kill_wait(1) was supposed to have done, but doesn't.

Modified item-fst void use( void ):
//disallow diagonal punches
&basehit = sp_dir(1, -1);
sp_dir(1, &basehit);
	
if (sp_dir(1, -1) == 1)
	sp_dir(1, 2);
if (sp_dir(1, -1) == 3)
	sp_dir(1, 2);
if (sp_dir(1, -1) == 7)
	sp_dir(1, 8);
if (sp_dir(1, -1) == 9)
	sp_dir(1, 8);
	
//100 is the 'base' for the hit animations, we just add the direction
&basehit = sp_dir(1, -1);
&basehit += 100;
	
sp_seq(1, &basehit);
sp_frame(1, 1);
sp_nocontrol(1, 1); //dink can't move until anim is done!
wait(1);

playsound(8, 8000,0,0,0);


Sorry that I answered my own question. But at any rate, feel free to use this workaround in your DMODs. It's a small difference but it rocks anyways because it affects every single weapon and spell in the game where Dink uses an animation, with an exception to bows. Hopefully now there will be no more having Dink freeze for a moment when you are attacking a fast enemy getting you hit when you know it shouldn't have happened. Yay! What's that spell-check program, yay isn't a real word?

After some testing, I've discovered that it works well with any weapon that uses sp_nocontrol in it. It does not appear to make a difference with bows because it seems that they use a different system to prevent control anyways.

Weapons I've tested that work better now:
Fist, Sword, Claw Sword, Throwing Axe, Herb Boots, Fireball, Hellfire.

Based on that information I also deduce it should work without issue with:
Acid Rain, Light Sword.

Useless or bad with:
Bow of any kind, Bomb, etc, anything without sp_nocontrol in the void use( void ) function.

How to add to your DMOD:
//replace &var with any variable that already exists in the script
&var = sp_dir(1, -1);
sp_dir(1, &var);


Just place that in the beginning of void use( void ) of the item in question.