Script addhits problem

dantedevil

Well-known member
I find some bug using this script:
Code:
/* 
 * Add hits to your hit counter without really "hit" the opponent
 * Useful in mult hit throws
 * created by Don Drago
 */
void addhits(int hits) {
	void self = getlocalvar("self");
	int previous = getentityproperty(self, "rush_count");
	changeentityproperty(self, "rush_count", previous+hits);
}

Ex: In this animation I use the addhits three times, so the killer instinct announcer says "triple combo", but the rush count never appears on the screen.
Code:
anim freespecial23
	 loop   0
         attackone 1
	 offset 82 177
	 bbox	0 0 0 0
         @cmd   anti
         @cmd   cancelgrab
	 frame	data/chars/midas/backbr3.png
         delay  15
         @cmd   slamstart2
         @cmd   position 5 -10 24 1 -1
	 frame	data/chars/midas/backbr3.png
	 delay	8
         @cmd   antiwall 50 -15 -1 
         @cmd   position 5 -10 39 1 -1
	 frame	data/chars/midas/backbr0.png
         @cmd   position 7 25 58 1 -1
         frame	data/chars/midas/grab1.png
	 delay      10
         @cmd    position 0 53 1 -1 -1
         frame	data/chars/midas/throw0.png
	 delay      8
         @cmd    position 0 44 30 -1 0
	 frame	data/chars/midas/grabat0.png
         sound   data/chars/midas/gold.wav
	 delay	4
	 frame	data/chars/midas/grabat3.png
	 frame	data/chars/midas/grabat3b.png
	 frame	data/chars/midas/grabat3.png
	 frame	data/chars/midas/grabat3b.png
	 frame	data/chars/midas/grabat3.png
	 frame	data/chars/midas/grabat3b.png
	 delay	20
	 frame	data/chars/midas/grabat3b.png
	 delay      6
         @cmd    position 0 42 30 -1 0
	 frame	data/chars/midas/grabat1b.png
	 delay      16
         @cmd     addhits 1
         @cmd    spawn01 "flash2" 43 110 1
	 sound	data/sounds/metal.wav
	 @cmd   hurt2 11
         @cmd   antiwall 50 -15 -1
         @cmd    position 0 40 30 -1 0
	 frame	data/chars/midas/grabat2bb.png
	 delay      6
         @cmd    position 0 42 30 -1 0
	 frame	data/chars/midas/grabat1b.png
	 delay      16
         @cmd    position 0 44 30 -1 0
	 frame	data/chars/midas/grabat3b.png
	 delay      6
         @cmd    position 0 42 30 -1 0
	 frame	data/chars/midas/grabat1b.png
	 delay      16
         @cmd     addhits 1
         @cmd    spawn01 "flash2" 43 110 1
	 sound	data/sounds/metal.wav
	 @cmd   hurt2 11
         @cmd    position 0 40 30 -1 0
	 frame	data/chars/midas/grabat2bb.png
	 delay      6
         @cmd    position 0 42 30 -1 0
	 frame	data/chars/midas/grabat1b.png
	 delay      12
         @cmd    position 0 44 30 -1 0
	 frame	data/chars/midas/grabat3b.png
	 delay      6
         @cmd    position 0 42 30 -1 0
	 frame	data/chars/midas/grabat1b.png
	 delay      1
         @cmd     addhits 1
         @cmd    spawn01 "flash2" 43 110 1
	 sound	data/sounds/metal.wav
	 @cmd   hurt2 13
         @cmd   antiwall 50 -20 -1
         @cmd    position 0 40 30 -1 0
	 frame	data/chars/midas/grabat2bb.png
	 delay    1
	 @cmd	depost 0
         @cmd   finish 1 1 -1 1 0 0
	 delay      18
	 frame	data/chars/midas/grabat2bb.png
	 delay    6
	 frame	data/chars/midas/grabat1b.png
	 frame	data/chars/midas/grabat3b.png
         sound   data/chars/midas/gold.wav
	 delay	4
	 frame	data/chars/midas/grabat3b.png
	 frame	data/chars/midas/grabat3.png
	 frame	data/chars/midas/grabat3b.png
	 frame	data/chars/midas/grabat3.png
	 frame	data/chars/midas/grabat3b.png
	 frame	data/chars/midas/grabat3.png

So what missing here?
 
This script just adds to the hit counter.

The time that rush counter stays on screen won't be affected by it.

Also, if you didn't already hit the enemy with some attack The counter won't even appear.

Maybe you should use something we call on MUGEN as "grab attempt" on your FREESPECIAL23, with a FOLLOW ?

I did that on Akuma, where this script was born. The SGS motion is a hit. The 14 hit later are on FOLLOW anim.
 
Back
Top Bottom