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
 
I mentioned @stop because of this:

Die_In_Fire said:
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

:-\

My reply was this:

Itsuchi KS said:
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)

I figured he was doing a slam instead of a simple throw but we just now can see what he was trying to do 8)
 
He started out wanting to use cmd @slam, so I showed him how to use it with  out his game crashing. Then he changed to using cmd @throw and not @slam which voided what I taught him. That why I said your way was better because I haven't used cmd @throw yet but I know you have.
 
Since I'm kinda confused with slams and after Die_In_Fire posted his mistake, I'm going to share my slam/throw function here. He's not the only one with that weird effect. I have a similar problem as him. But I'm using a reference of Bloodbane's throw script from Grill's Sailor Moon. I use forceanim over to anim fall3 and I did copy the throw script from the player.c and paste it under grabscript.c. I have just only 3 fall anims for enemy. (I'm in a mess of doing throws.)

anim grabforward
delay 5
offset 162 202
@cmd slamstart
frame data/chars/billy/throw01.png
@cmd bind 1 -12 1 66 -2
@cmd forceanim "ANI_FALL3"
delay 8
frame data/chars/billy/throw01.png
@cmd bind 1 -6 1 66 -1
frame data/chars/billy/throw02.png
frame data/chars/billy/throw03.png
frame data/chars/billy/throw04.png
@cmd bind 1 15 1 41 -1
frame data/chars/billy/throw05.png
frame data/chars/billy/throw06.png
@cmd bind 1 61 1 101 -1
frame data/chars/billy/throw07.png
frame data/chars/billy/throw08.png
@cmd bind 0 0 0 0 0
@cmd throw 10 2 2 1 0 0
frame data/chars/billy/throw09.png
delay 10
@cmd clearL
frame data/chars/billy/throw10.png

Enemy's fall anim of being thrown:
anim fall3
delay 40
offset 36 106
bbox 14 4 35 104
frame data/chars/buntaro/grabbed.png
bbox 52 13 48 105
delay 25
offset 79 113
frame data/chars/buntaro/fall02.png
offset 80 128
frame data/chars/buntaro/fall03.png
offset 80 130
frame data/chars/buntaro/fall06.png

Looks weird/awkward/funny isn't it?
6_26_2013_8_44_50_AM.gif


EDIT: I just realized that I didn't add escript.c in the character header under enemy. I added that escript.c animationscript in the enemy text but it crashes. Here is the log.

Code:
Total Ram: 1062649856 Bytes
 Free Ram: 52535296 Bytes
 Used Ram: 1712128 Bytes

debug:nativeWidth, nativeHeight, bpp  1024, 600, 32

0 joystick(s) found!
OpenBoR v3.0 Build 3946, Compile Date: May 22 2013

Game Selected: ./Paks/mybor.pak

FileCaching System Init......	Disabled
Initializing video............
Reading video settings from 'data/video.txt'.
Initialized video.............	320x240 (Mode: 0, Depth: 32 Bit)

Loading menu.txt.............	Done!
Loading fonts................	1 2 3 4 Done!
Timer init...................	Done!
Initialize Sound..............	
Loading sprites..............	Done!
Loading level order..........	Done!
Loading model constants......	Done!
Loading script settings......	Done!
Loading scripts..............	Done!
Loading models...............

Cacheing 'Flash' from data/chars/misc/flash.txt
Cacheing 'VF' from data/sprites/VF.txt
Cacheing 'Billy' from data/chars/billy/billy.txt
Cacheing 'Jimmy' from data/chars/jimmy/jimmy.txt
Cacheing 'Lynn' from data/chars/lynn/lynn.txt
Cacheing 'Mpack' from data/chars/misc/mpack.txt
Cacheing '1up' from data/chars/misc/1up.txt
Cacheing 'hamburger' from data/chars/misc/hambur.txt
Cacheing 'Money' from data/chars/misc/money.txt
Cacheing 'Meat' from data/chars/misc/meat.txt
Cacheing 'Knife' from data/chars/misc/knife.txt
Cacheing 'Box' from data/chars/misc/box.txt
Cacheing 'Buntaro' from data/chars/buntaro/buntaro.txt
Cacheing 'Shintaro' from data/chars/shintaro/shintaro.txt
Cacheing 'Jack' from data/chars/jack/jack.txt
Cacheing 'Chinnen' from data/chars/chinnen/chinnen.txt
Cacheing 'Olof' from data/chars/olof/olof.txt
Cacheing 'Flogger' from data/chars/flogger/flogger.txt
Cacheing 'Empty' from data/chars/misc/empty.txt
Cacheing 'Wong' from data/chars/cheng/cheng.txt
Cacheing 'Kulio' from data/chars/yun/yun.txt
Cacheing 'Dingo' from data/chars/dingo/dingo.txt
Cacheing 'Iggy' from data/chars/iggy/iggy.txt
Cacheing 'Eagle' from data/chars/eagle/eagle.txt
Cacheing 'Duck' from data/chars/duck/duck.txt
Cacheing 'Abubo' from data/chars/abubo/abubo.txt
Cacheing 'Burnov' from data/chars/burnov/burnov.txt
Cacheing 'Sonia' from Data/Chars/Sonia/Sonia.txt
Cacheing 'Sonia2' from Data/chars/Sonia/Sonia2.txt
Cacheing 'Captain_Commando' from Data/chars/capcom/CapCom.txt
Cacheing 'Baby_Head' from Data/chars/BabyCommando/babyhead.txt

Loading 'Flash' from data/chars/misc/flash.txt
Loading 'VF' from data/sprites/VF.txt
Loading 'Billy' from data/chars/billy/billy.txt
Loading 'Jimmy' from data/chars/jimmy/jimmy.txt
Loading 'Lynn' from data/chars/lynn/lynn.txt
Loading 'Sonia' from Data/Chars/Sonia/Sonia.txt
Loading 'Captain_Commando' from Data/chars/capcom/CapCom.txt
Loading 'Baby_Head' from Data/chars/BabyCommando/babyhead.txt

Loading models...............	Done!
Object engine init...........	Done!
Input init...................	No Joystick(s) Found!
Done!
Create blending tables.......	Done!
Save settings so far........	Done!



Can't play music file 'data/music/remix'

Can't play music file 'data/music/remix'

Can't play music file 'data/music/remix'

Can't play music file 'data/music/menu'

Can't play music file 'data/music/remix'
Level Loading:   'data/levels/90210.txt'
Total Ram: 1062649856 Bytes
 Free Ram: 50196480 Bytes
 Used Ram: 14487552 Bytes

Loading 'Buntaro' from data/chars/buntaro/buntaro.txt
sound_load_sample can't load sample from file 'data/chars/shintaro/shindie.wav'!
Command '5' not understood in file 'data/chars/shintaro/shintaro.txt'!
Command '10' not understood in file 'data/chars/shintaro/shintaro.txt'!
Loading 'Shintaro' from data/chars/shintaro/shintaro.txt
sound_load_sample can't load sample from file 'data/chars/olof/olofcry.wav'!
Loading 'Olof' from data/chars/olof/olof.txt
sound_load_sample can't load sample from file 'data/chars/chinnen/chindie.wav'!
Warning: Failed to create colourmap. Failed to load file 2
Warning: Failed to create colourmap. Failed to load file 2
Warning: Failed to create colourmap. Failed to load file 2
Warning: Failed to create colourmap. Failed to load file 2
Loading 'Chinnen' from data/chars/chinnen/chinnen.txt
sound_load_sample can't load sample from file 'data/chars/buntaro/bundie.wav'!
Loading 'Flogger' from data/chars/flogger/flogger.txt
sound_load_sample can't load sample from file 'data/sounds/sukedie.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
Loading 'Iggy' from data/chars/iggy/iggy.txt
sound_load_sample can't load sample from file 'data/sounds/EAgledie.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
Loading 'Eagle' from data/chars/eagle/eagle.txt
sound_load_sample can't load sample from file 'data/sounds/chumpdie.wav'!
WARNING: data/chars/cheng/cheng.txt tries to load a nonnumeric value at load, where a number is expected!
erroneus string: data/chars/misc/knife.txt
Loading 'Knife' from data/chars/misc/knife.txt
Loading 'Wong' from data/chars/cheng/cheng.txt
sound_load_sample can't load sample from file 'data/sounds/sukedie.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
sound_load_sample can't load sample from file 'data/sounds/MALEPAIN.wav'!
Loading 'Dingo' from data/chars/dingo/dingo.txt
sound_load_sample can't load sample from file 'data/chars/buntaro/bundie.wav'!
Loading 'Jack' from data/chars/jack/jack.txt
sound_load_sample can't load sample from file 'data/sounds/wood.wav'!
Loading 'Box' from data/chars/misc/box.txt
Loading 'BURGER' from data/chars/misc/hambur.txt
Loading 'MPACK' from data/chars/misc/mpack.txt

Level Loaded:    'data/levels/90210.txt'
Total Ram: 1062649856 Bytes
 Free Ram: 133079040 Bytes
 Used Ram: 19308544 Bytes
Total sprites mapped: 1259


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

There's an exception while executing script 'animationscript' data/chars/buntaro/buntaro.txtTotal Ram: 1062649856 Bytes
 Free Ram: 133070848 Bytes
 Used Ram: 19316736 Bytes

Release level data...........Level Unloading: 'data/levels/90210.txt'
Total Ram: 1062649856 Bytes
 Free Ram: 138612736 Bytes
 Used Ram: 19316736 Bytes

Done.
Total Ram: 1062649856 Bytes
 Free Ram: 138612736 Bytes
 Used Ram: 19316736 Bytes

	Done!
Release graphics data........	Done!
Release game data............

Unload 'Flash' ............done.
Unload 'VF' ............done.
Unload 'Billy' ............done.
Unload 'Jimmy' ............done.
Unload 'Lynn' ............done.
Unload 'Sonia' ............done.
Unload 'Captain_Commando' ............done.
Unload 'Baby_Head' ............done.
Unload 'Buntaro' ............done.
Unload 'Shintaro' ............done.
Unload 'Olof' ............done.
Unload 'Chinnen' ............done.
Unload 'Flogger' ............done.
Unload 'Iggy' ............done.
Unload 'Eagle' ............done.
Unload 'Wong' ............done.
Unload 'Knife' ............done.
Unload 'Dingo' ............done.
Unload 'Jack' ............done.
Unload 'Box' ............done.
Unload 'BURGER' ............done.
Unload 'MPACK' ............done.

Release game data............	Done!
Release timer................	Done!
Release input hardware.......	Done!
Release sound system.........	Done!
Release FileCaching System...	Done!

**************** Done *****************

There's an exception while executing script 'animationscript' data/chars/buntaro/buntaro.txt

grabscript.c I edited. Note that this is not a resource, but it's for checking.

https://www.dropbox.com/s/q7uod38deyitg74/grabscript.c
 
Guys, I did it on my PDC mod and works perfectly. I just can't remember if this is the most updated one, but try it http://cavernofcreativity.com/Atlas/Thread-Open-Beats-Of-Rage-Pocket-Dimensional-Clash
 
Itsuchi KS said:
He started out wanting to use cmd @slam, so I showed him how to use it with  out his game crashing. Then he changed to using cmd @throw and not @slam which voided what I taught him. That why I said your way was better because I haven't used cmd @throw yet but I know you have.

I'm using both. Just didn't post the full animation again, only the @throw part which is the part giving me troubles now.

 
O Ilusionista said:
Guys, I did it on my PDC mod and works perfectly. I just can't remember if this is the most updated one, but try it http://cavernofcreativity.com/Atlas/Thread-Open-Beats-Of-Rage-Pocket-Dimensional-Clash

Will do when arrive home, but still I can't understand what is failing. What is worst, I actually find easy to understand the logic to make this animation, on my other mod I have a spinning throw that works very close of what I want, but on this mod the result don't match what I think I did input.
I think I have some other script somewhere that is creating conflict.
In the meantime I will do what Maggas suggested, adding just the missing parameter and see what happens.

We need to fix Jonsolva's manual to avoid other modders to get misinformed and do the same mistakes I did.
 
We need to fix Jonsolva's manual to avoid other modders to get misinformed and do the same mistakes I did.

I've used it and it works fine, this is what I don't understand.

This is the code from my Captain Commando:

Code:
anim	grabbackward
	delay	8
	attackone	0
	offset	31 67
	@cmd	slamstart
	@cmd	position 0 20 0 -1 0
	frame	data/chars/capcomm/grab.gif
	@cmd	position 1 -4 30 -1 0
	frame	data/chars/capcomm/t1.gif
	@cmd	position 1 -27 35 -1 0
	sound	data/chars/capcomm/at3.wav
	frame	data/chars/capcomm/t2.gif
	delay	60
	@cmd	depost 0
	@cmd	throw 25 2 4 0.5 0 0
	frame	data/chars/capcomm/t2.gif
	@cmd	clearL
	flipframe	4
	delay	10
	frame	data/chars/capcomm/ba1.gif

I use flipframe because its a backthrow.

The enemy have two anims for that
rs6.gif


Code:
anim	fall7
	delay	1000
	offset	16 38
	@cmd	spawn01 "po" 0 0 0
	frame	data/chars/basic/3.gif
	offset	36 14
	frame	data/chars/basic/5d.gif
	offset	16 38
	frame	data/chars/basic/5e.gif
		
anim	fall9
	attack	2 1 24 40 10 1 1 0 0 0
	delay	1000
	landframe	1
	offset	16 38
	frame	data/chars/basic/5e.gif
	offset	23 17
	delay	10
	drawmethod	256 256 0 0 0 0 -1 0 0 0
	frame	data/chars/basic/6.gif

Both anims are required because the slam and throw codes use it, take a look:

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
  }
}

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

  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, 1, openborconstant("ATK_NORMAL")); // 1st throw type
    }

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

    if(Type==3)
    {
      damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL2")); // 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 ;)
  }
}

You will need to use fall2 if you change the type to 3
 
O', I did exactly what you said, it didn't change, same weird as the above animated gif.

I will start explaining from zero.

this is my enemy's anims for the slam and throw:
blabla.png

Code:
anim fall7
	delay      1000
	offset     30 81
	frame      data/chars/will/17.png
	frame      data/chars/will/18.png
	frame      data/chars/will/14.png
	frame      data/chars/will/22.png

anim fall9
	loop       0
	delay      1000
	landframe 1
	offset     30 81
	attack	14 59 14 16 4 1
	frame      data/chars/will/22.png
	attack 0
	delay      20
	frame      data/chars/will/18.png

1) to explain a little better, at the beginning I had the @throw with one less parameter, following jonsilva's manual (which was mistaken):
@cmd throw 35 -2.5 2.5 0 0

with this result:
throw1.gif

you can see that it looks fine, except for the fact that I want the anim fall 9 to be played IOW to see the 22.png on that fall.

by adding the extra parameter, the 2 to display anim fall 9 (if type=2 ---> ATK_NORMAL9 line), as described by O', I changed like this:
@cmd throw 35 2 -2.5 2.5 0 0
but I get this result:
throw2.gif

which is wrong because:
-the throw arc is weird
-keep displaying the standard fall (or 17.png), instead of displaying fall9, aka 22.png

my code for Bimmy (this time following O's code for his CapCom on the post above this one on the previous page):
Code:
anim	grabforward
#	@cmd	lock
	Delay	7
	offset     30 81
	@cmd	slamstart
	@cmd	position 2 7 0 -1 -1
	frame      data/chars/billy/56.png
	delay	5
	@cmd	position 2 6 8 -1 -1
	offset     30 81
	frame      data/chars/billy/56.png
	delay	6
	@cmd	position 2 7 8 -1 -1
	offset     30 81
	frame      data/chars/billy/57.png
	@cmd	position 2 7 8 -1 -1
	offset     30 81
	frame      data/chars/billy/57.png
	@cmd	position 2 8 8 -1 -1
	offset     30 81
	frame      data/chars/billy/57.png
	delay	20
	@cmd	throw 35 2 -2.5 2.5 0 0
	offset     30 81
	frame      data/chars/billy/58.png
	@cmd	clearL
	delay	10
	frame      data/chars/billy/58.png
also it doesn't change anything if I have lock or #lock

any suggestions?? I still think that somehow, some extra script is conflicting with this script.
I tried almost anything.

 
@cmd  throw 35 2 -2.5 2.5 0 0

It should be

@cmd  throw 35 2 2.5 2.5 0 0
or it will go to the opposite direction

Code:
void throw(int Damage, int Type, int x, int y, int z, int Face)

I still think that somehow, some extra script is conflicting with this script.
I tried almost anything.

I am hell sure about it. As I said, try with a fresh mod or disable every extra script (like spawn, didhit, update, etc).

 
magggas said:
This weird thing happened after you used the edited void function by WD which have 7 parameters instead of 6.Maybe that causes this problem.If so,just try to use the standard void function like before.
Using the old throw, without WD gives the same weird result.

(Because the result you have with this values @cmd  throw 35 2 2.5 2.5 0 0,does not make any sense)

ps: or finally,if you still have problems,i can make it for you if you send me a copy of the mod.
I sent it to O', depending on what he says, I will send it to you  :)
It's time to delete non used scripts  :-[
 
DIF, I got it. I noticed the throw have a Z velocity where it was to a Y velocity, so I fell something fish on it and...bingo.

your Bimmy uses kunio.c which have (pay attention to the bold):

#include "data/scripts/common/commons.c"
#include "data/scripts/common/cmdslam.c"
#include "data/scripts/ani0020.h"

which calls
#include "data/scripts/common/slam.c"

At the slam.c, you have this:

Code:
void throw(int Damage, int x, int y, int z, int Face)
{	
	void self = getlocalvar("self");
	void target = getlocalvar("Target" + self);
	int SDir = getentityproperty(target,"direction");
	int MDir;
	void at = getentityproperty(self, "offense",openborconstant("ATK_NORMAL"));
	void df= getentityproperty(target, "defense", openborconstant("ATK_NORMAL"), "factor");
	Damage*=at*df;
	if(Face==1){
		if(SDir==0){
			MDir = 1;
		} else {
			MDir = 0;
		}
	}else{
		MDir = SDir;
	}

	if(target==NULL())
	{
		setidle(self);
	}else{
		int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
		if(dir==0){
			x = -x;
		}
		damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL")); // 1st 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 ;)
		clearSlam();
	}
}

And you use this to call it:
@cmd throw 35 2 -2.5 2.5 0 0

See it? This is the wrong function!
There are just 5 variables, and there is NO type. This is why the command still works if you put just 5.

The right one is this, look at your script.c:
Code:
void throw(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as throw finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   int SDir = getentityproperty(target,"direction");
   int MDir;

   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, 1, openborconstant("ATK_NORMAL")); // 1st throw type
     }

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

     if(Type==3)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL2")); // 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 ;)
   }
}

now call it as you would:

@cmd throw 35 2 -2.5 2.5 0 0

and voila! Its working!

For this type of error, its better to have a useful too: Notepad ++ http://notepad-plus-plus.org/
you can search for a string in every fille, this is how I got the error.
plus, you can see C script with colors.

edit: plus, you forgot to use @cmd depost 0 before the throw. It should be:

Code:
	@cmd	depost 0
	@cmd	throw 35 2 -2.5 2.5 0 0
 
Obrigado!!
So I will remove the throw function from the slam.c when I got back home ( this is the best solution?). And also add the @depost
I got this script from volcanic's mod so I never thought it will have different functions, I thought it was using the same as BloodBane's.

And sure will take a look into notepad++, I think it's time to use more modern tools  :-X
 
Back
Top Bottom