small scripted throw question

Die_In_Fire

Well-known member
How can I specify which enemy sprite to show during player's @cmd position X X X X and @throw X X X X X???

I would like to know how to customize more the enemy reaction on this move:
Code:
anim	grabforward
	@cmd	lock
	#@cmd	slamStart
	[color=red]@cmd	position 2 7 0 -1 -1[/color]
	Delay	7
	offset     30 81
	frame      data/chars/billy/56.png
	[color=red]@cmd	position 2 6 0 -1 -1[/color]
	offset     30 81
	frame      data/chars/billy/56.png
	delay	5
	[color=red]@cmd	position 4 6 8 -1 -1[/color]
	offset     30 81
	frame      data/chars/billy/56.png
	delay	6
	[color=red]@cmd	position 2 7 8 -1 -1[/color]
	offset     30 81
	frame      data/chars/billy/57.png
	[color=red]@cmd	position 2 7 8 -1 -1[/color]
	offset     30 81
	frame      data/chars/billy/57.png
	[color=red]@cmd	position 2 8 8 -1 -1[/color]
	offset     30 81
	frame      data/chars/billy/57.png
	delay 	20
	[color=red]@cmd	throw 35 -2.5 2.5 0 0[/color]
	offset     30 81
	frame      data/chars/billy/58.png
 
Here ya go.

@cmd  position [1] [2] [3] [4] [5] - this controls the victims image frame and position, and it needs to declared for
            each frame of the slam/throw (see example *.txt above)
[1] nº of fall7 animation (starts in 0)
[2] X axis  -/+ <- ->
[3] Y axis -/+  down / up
[4] Z axis -/+ (layer position) (ex: -1 behind attacker | 1infront attacker // -10 more behind | 10 more infront)
[5] Controls victims facing direction: 0 = no change, 1 = same direction as slammer/thrower,
                  -1 = opposite direction as slammer
Example: @cmd position
  @cmd  position 6 50 45 -1 -1



So It will load sprites in a created anim "fall7" that contain all the needed sprites for the pain anim.

Actually this is one of the really few things I'm able to understand in all the foreign language of scripting... :-\

Hope, it helps.
 
oh yes I forgot to create the fall7 for my enemies! I had it working fine on my RCRZ mod, but forgot to add for my DD mod... Also forgot that fall7 is not a real "fall animation" but just a slideshow to choose the right sprite to be used on the slam scripts.

 
I have problems with this:
Code:
	flipframe	0
#	@cmd	lock
	@cmd	slamStart
	@cmd	position 0 -10 5 -1 1
	Delay	5
	 offset     30 81
	 frame      data/chars/billy/56.png
	frame      data/chars/billy/56.png
	@cmd	position 0 20 20 -1 1
 frame      data/chars/billy/57.png
 frame      data/chars/billy/57.png
	@cmd	throw 26 2 2 0 0
	@cmd	clearSlam
	frame      data/chars/billy/58.png
	delay 20
	frame      data/chars/billy/58.png

the @slamstart make the engine crash with this error:
Script compile error: can't find function 'slamStart'

Script compile error in 'animationscript': slamStart line 65, column 12

********** An Error Occurred **********
*            Shutting Down            *

Can't compile script 'animationscript' data/chars/billy/bimmy.txt


which is strange because I already have on the animationscript the fuinction:
Code:
void slamstart()
{ // Slam Starter
// Use finish after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7")); // Slam Starter
   }
}

and I have maxentityvars  30 and maxindexedvars  100

:-\
 
another problem:
nedflandeurse said:
Here ya go.

@cmd  position [1] [2] [3] [4] [5] - this controls the victims image frame and position, and it needs to declared for
            each frame of the slam/throw (see example *.txt above)
[1] nº of fall7 animation (starts in 0)
[2] X axis  -/+ <- ->
[3] Y axis -/+  down / up
[4] Z axis -/+ (layer position) (ex: -1 behind attacker | 1infront attacker // -10 more behind | 10 more infront)
[5] Controls victims facing direction: 0 = no change, 1 = same direction as slammer/thrower,
                  -1 = opposite direction as slammer
Example: @cmd position
  @cmd  position 6 50 45 -1 -1



So It will load sprites in a created anim "fall7" that contain all the needed sprites for the pain anim.

but how can I set it to play the sprite I want not during the grab, but on the fall animation?
 
I think it uses one of your default fall anims.
I received some help by BB about it, but I'm not sure to give you the best explanation.

Sorry I'm not a coder,
some things are too complex to me.

Try asking BB directly. ;)
 
This may help:
Code:
anim	follow1
        drawmethod  195 250 0 0 0 0 -1
        hitfx	data/sounds/hit1.wav
        hitflash          qflash2
        fastattack        1
	@cmd	stop  <----YOU MISSED THIS
	@cmd	lock
	@cmd	slamStart
	@cmd	position 0 20 1 -2 -1
	delay	6
	offset	89 175
	sound	data/chars/sean/mata.wav
	frame	data/chars/sean/tackle1.png
	@cmd	position 0 25 1 -2 -1
	move    7
	frame	data/chars/sean/tackle2.png
	@cmd	position 1 0 40 -2 -1
	frame	data/chars/sean/tackle3.png
	@cmd	position 3 -13 1 -2 -1
	frame	data/chars/sean/tackle4.png
	frame	data/chars/sean/tackle5.png
	move    0
	frame	data/chars/sean/tackle6.png
	frame	data/chars/sean/pound1.png
	sound	data/sounds/sw.wav
	frame	data/chars/sean/pound2.png
	@cmd	hurt2 3 1
	@cmd	spawn01 "qflash2" 0 20 1
	sound	data/sounds/hit1.wav
	frame	data/chars/sean/pound3.png
	frame	data/chars/sean/pound4.png
	frame	data/chars/sean/pound5.png
	frame	data/chars/sean/pound6.png
	sound	data/sounds/sw.wav
	frame	data/chars/sean/pound7.png
	@cmd	hurt2 4 1
	@cmd	spawn01 "qflash2" 0 20 1
	sound	data/sounds/hit1.wav
	frame	data/chars/sean/pound8.png
	frame	data/chars/sean/pound9.png
	frame	data/chars/sean/pound10.png
	frame	data/chars/sean/pound1.png
	sound	data/sounds/sw.wav
	frame	data/chars/sean/pound2.png
	@cmd	hurt2 4 1
	@cmd	spawn01 "qflash2" 0 20 1
	sound	data/sounds/hit1.wav
	frame	data/chars/sean/pound3.png
	frame	data/chars/sean/pound4.png
	frame	data/chars/sean/pound5.png
	frame	data/chars/sean/pound6.png
	sound	data/sounds/sw.wav
	frame	data/chars/sean/pound7.png
	@cmd	hurt2 5 1
	@cmd	spawn01 "qflash2" 0 20 1
	sound	data/sounds/hit1.wav
	frame	data/chars/sean/pound8.png
	frame	data/chars/sean/pound9.png
	frame	data/chars/sean/pound10.png
#
	offset	89 175
	frame	data/chars/sean/smash1.png
	frame	data/chars/sean/smash2.png
	frame	data/chars/sean/smash3.png
	@cmd	spawn02 "flash3"
	@cmd	spawn01 "flash4" 0 130 1
        sound   data/chars/sean/speech2.wav
	frame	data/chars/sean/smash4.png
	@cmd	finish 25 3 2 0 -1    <----YOU MISSED THIS
	@cmd	spawn01 "wave" 0 0 -1
	sound	data/sounds/hit1.wav
	@cmd	depost    <----YOU MISSED THIS
	@cmd	clearSlam
	frame	data/chars/sean/smash5.png
	frame	data/chars/sean/smash6.png
	frame	data/chars/sean/smash1.png
	frame	data/chars/sean/smash7.png
	frame	data/chars/sean/slide3.png
	frame	data/chars/sean/roll1.png
	frame	data/chars/sean/rise11.pnga/chars/sean/rise11.png

You should always finish and deposit a slam before clearing it or it won't work 8)
 
the @slamstart make the engine crash with this error:
Script compile error: can't find function 'slamStart'

Scripts are case sensitive. So if name of function is slamstart (no caps) you must type it exactly like that.

how can I set it to play the sprite I want not during the grab, but on the fall animation?

Whose grab and whose fall animation?
 
Bloodbane said:
how can I set it to play the sprite I want not during the grab, but on the fall animation?

Whose grab and whose fall animation?

When I'm using the scripted slam/throw for the player(the move written above), I would like a custom fall animation for the enemy on this event, but it shows the standard fall animation.
like we can do that with attack3 ---> fall3
 
Use an ATTACK TYPE (with knock down active) and the same FALL TYPE as the reaction at the release of the throw "with an empty hitflash" and use dropv to determine where the enemy is thrown.

EX: ATTACK9 = FALL9 or even PAIN9

DONT PUT A HITFLASH OR HITFX WITH IT BECAUSE IT WILL LOOK LIKE ENEMY GOT HIT WHEN HE WAS ONLY THROWN SO USE AN EMPTY OR BLANK SPRITE SO IT WONT SHOW, OTHERWISE IT WILL USE DEFAULT HITFLASH.
 
Here the customized throw.
Added drop flag (last value).
If you set drop to 1 or higher, your opponent will fall!
else if you set drop to 0 your opp will b in pain anim

Code:
void throw(int Damage, int Type, int x, int y, int z, int Face, int drop)
{ // Damage as throw finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   int SDir = getentityproperty(target,"direction");
   int MDir;

   if ( drop < 0 ) drop = 0;

   if(Face==0){ // Same facing?
       MDir = SDir;
   }

   if(Face==1){ // Opposite facing?

     if(SDir==0){ // Facing left?
       MDir = 1;
     } else { MDir = 0;}
   }

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
     if(dir==0){ // Facing left?
       x = -x;
     }

     if(Type==1)
     {
       damageentity(target, self, 0, drop, openborconstant("ATK_NORMAL5")); // 1st throw type
     }

     if(Type==2)
     {
       damageentity(target, self, 0, drop, openborconstant("ATK_NORMAL9")); // 2nd throw type
     }

     if(Type==3)
     {
       damageentity(target, self, 0, drop, openborconstant("ATK_BURN")); // 3rd throw type
     }

     changeentityproperty(target, "attacking", 1);
     changeentityproperty(target, "damage_on_landing", Damage);
     changeentityproperty(target, "projectile", 1);
     changeentityproperty(target, "direction", MDir);
     tossentity(target, y, x, z); // Toss opponent ;)
   }
}
 
magggas said:
The marked value is controlling which fall animation will play the enemy after release
@cmd    throw 5 1 3.5 2 0 0
....

that's what I want, but I learned from Jonsilva's manual like this:

Code:
@cmd throw [1] [2] [3] [4] [5] [6] – used to finish throw (works just like slam)
(use it at the end of the last slam frame)
(ex: @cmd throw 35 1 4 2 0 0)
[1] damadge made by the slam (- less damage) (+ more damage)
[2] distance X axis -/+
[3] altitude y axis -/+
[4] depth z axis -/+
[5] sets the direction the victim will fly -/+

before I had this and worked fine, with the exceoption that only played default fall animation instead of one of
my choice (reason of why I made this thread):
Code:
...
@cmd	position 2 8 8 -1 -1
	offset     30 81
	frame      data/chars/billy/57.png
	delay	20
	@cmd	throw 35 -2.5 2.5 0 0
	offset     30 81
	frame      data/chars/billy/58.png


But now, to have as Maggas showed, I already copy the void throw Maggas and WD posted and added to my animation script file. so for testing I changed it like this:
Code:
...
offset     30 81
	frame      data/chars/billy/57.png
	delay	20
	@cmd	throw 10 2 1 1 0 0 1
but the throw is weird now:
throw.gif


weird isn't it?  :-\

I think I have a mess now
 
Back
Top Bottom