Solved Minor Help

Question that is answered or resolved.
For some reason my player can't connect any attack after the first attack connects. The animations play but there is no move contact or damage. I have the attack boxes set as well as damage and pause times and I added atchain 1 2 4 3 in the header so I can't think of what could be causing this also the first attack seems to rarely to connect as well so any info on the issue would be appreciated.
 
That script is modified version of this:

Code:
void spawn01(void vName, float fX, float fY, float fZ)
{
	//spawn01 (Generic spawner)
	//Damon Vaughn Caskey
	//07/06/2007
	//
	//Spawns entity next to caller.
	//
	//vName: Model name of entity to be spawned in.
	//fX: X location adjustment.
	//fY: Y location adjustment.
      //fZ: Z location adjustment.

	void self = getlocalvar("self"); //Get calling entity.
	void vSpawn; //Spawn object.
	int  iDirection = getentityproperty(self, "direction");

	clearspawnentry(); //Clear current spawn entry.
      setspawnentry("name", vName); //Acquire spawn entity by name.

	if (iDirection == 0){ //Is entity facing left?                  
          fX = -fX; //Reverse X direction to match facing.
	}

      fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
      fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
      fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
	
	vSpawn = spawn(); //Spawn in entity.

	changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
	changeentityproperty(vSpawn, "direction", iDirection); //Set direction.
    
	return vSpawn; //Return spawn.
}

If you use that script (the one you posted), spawned entity will use same map as spawner's

As for possible or not, it depends on your purpose. What exactly you want?
 
Try this,

shooterM is the function you should be using. It will shoot defined entity with defined speed and with same map as spawner's map
Both functions shoot spawned entity with defined speed. If you want to spawn something without the speed, just set speed parameters 0
This function requires spawn01 function BTW

Code:
void shooter(void Shot, float dx, float dy, float Vx, float Vy)
{ // Shooting special projectile with speed control
   void self = getlocalvar("self");
   int Direction = getentityproperty(self, "direction");
   void vShot;

   if (Direction == 0){ //Is entity facing left?                 
      Vx = -Vx; //Reverse Vx direction to match facing
   }

   vShot = spawn01(Shot, dx, dy, 0);
   changeentityproperty(vShot, "velocity", Vx, 0, Vy);
   return vShot;
}

void shooterM(void Shot, float dx, float dy, float Vx, float Vy)
{ // Shooting special projectile with speed control and matches its map with own's map
   void self = getlocalvar("self");
   int map = getentityproperty(self,"map");
   void Spawn;

   Spawn = shooter(Shot, dx, dy, Vx, Vy);
   changeentityproperty(Spawn, "map", map);
}
 
I'm trying to perform a grab attack where the player uses a rope to grab the opponent and pulls them towards them and hits them once they're in a certain range similar to one of black cats attacks in O ilusionista's avengers mod would I need to use grabscript for this because right now I'm using dropv and follow but it's not as precise as I would like and the follow attack sometimes is performed before enemy is within range
 
This is how I did:

The move with the rope
anim freespecial8
hitfx data/sounds/cut1.wav
hitflash cut1
loop 0
delay 6
offset 100 124
followcond 3
followanim 1

fastattack 1
grabin 1 60
sound data/chars/blackcat/att4.wav
@cmd spawn01 "super" 0 55 0
frame data/chars/blackcat/gancho00.png
bbox 92 71 32 55
delay 2
attack10 117 71 43 29 20 0 1 0 20 10
frame data/chars/blackcat/gancho01.png
attack10 140 73 30 29 20 0 1 0 20 10
frame data/chars/blackcat/gancho02.png
attack10 152 73 30 29 20 0 1 0 20 10
frame data/chars/blackcat/gancho03.png
attack10 163 73 30 29 20 0 1 0 20 10
frame data/chars/blackcat/gancho04.png
attack10 173 73 30 29 20 0 1 0 20 10
frame data/chars/blackcat/gancho04b.png
attack10 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/gancho04.png
frame data/chars/blackcat/gancho03.png
frame data/chars/blackcat/gancho02.png
frame data/chars/blackcat/gancho01.png
delay 10
frame data/chars/blackcat/gancho05.png

The follow1

anim follow1
loop 0
delay 10
offset 100 124
fastattack 1
jumpframe 42 4.5 0.6 0
attack 0 0 0 0 0 0 0 0 0 0
@cmd slamstart 0
@cmd position 0 60 0 -1 0
@cmd randSound0 "chars/blackcat/gotcha1.wav" "chars/blackcat/gotcha2.wav"
frame data/chars/blackcat/gancho04.png
delay 3
@cmd position 0 55 0 -1 0
frame data/chars/blackcat/gancho03.png
@cmd position 0 50 0 -1 0
frame data/chars/blackcat/gancho02.png
@cmd position 0 45 0 -1 0
frame data/chars/blackcat/gancho01.png
@cmd position 0 40 0 -1 0
frame data/chars/blackcat/spec02.png
@cmd position 0 35 0 -1 0
frame data/chars/blackcat/spec03.png
@cmd position 0 30 0 -1 0
frame data/chars/blackcat/spec04.png
@cmd position 0 25 0 -1 0
frame data/chars/blackcat/throw00.png
@cmd position 0 20 0 -1 0
@cmd depost 0
@cmd clearL
frame data/chars/blackcat/atk00.png
//
hitflash flash
delay 4
frame data/chars/blackcat/atk00.png
sound data/chars/blackcat/att1.wav
attack 108 69 39 24 1 0 0 0 5 10
frame data/chars/blackcat/atk01.png
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/atk00.png
hitflash flash2
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/atk300.png
frame data/chars/blackcat/atk200.png
attack 98 59 40 39 1 0 0 0 5 10
sound data/chars/blackcat/att2.wav
frame data/chars/blackcat/atk201.png
frame data/chars/blackcat/atk200.png
//
hitflash flash
frame data/chars/blackcat/atk00.png
sound data/chars/blackcat/att1.wav
attack 108 69 39 24 1 0 0 0 5 10
frame data/chars/blackcat/atk01.png
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/atk00.png
hitflash flash2
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/atk300.png
frame data/chars/blackcat/atk200.png
attack 98 59 40 39 1 0 0 0 5 10
sound data/chars/blackcat/att2.wav
frame data/chars/blackcat/atk201.png
frame data/chars/blackcat/atk200.png
hitflash flash2
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/atk300.png
frame data/chars/blackcat/atk200.png
attack 98 59 40 39 1 0 0 0 5 10
sound data/chars/blackcat/att2.wav
frame data/chars/blackcat/atk201.png
frame data/chars/blackcat/atk200.png
//
delay 6
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/free01.png
attack 89 65 46 52 10 1 0 0 5 10
dropv 3.5 1.1 0
frame data/chars/blackcat/free02.png
@cmd velo001 1.0 0 2.0
sound data/chars/blackcat/att2.wav
frame data/chars/blackcat/free02_2b.png
frame data/chars/blackcat/free03.png
offset 100 117
delay 12
frame data/chars/blackcat/jump02.png
delay 16
frame data/chars/blackcat/jump01.png
delay 10
offset 100 124
frame data/chars/blackcat/free04.png
sound data/chars/ironman/run.wav
//
delay 6
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/free01.png
attack 89 65 46 52 10 1 0 0 5 10
dropv 3.5 1.1 0
frame data/chars/blackcat/free02.png
@cmd velo001 1.0 0 2.5
ound data/chars/blackcat/att3.wav
frame data/chars/blackcat/free02_2b.png
frame data/chars/blackcat/free03.png
offset 100 117
delay 100
delay 12
frame data/chars/blackcat/jump02.png
delay 16
frame data/chars/blackcat/jump01.png
delay 10
offset 100 124
frame data/chars/blackcat/free04.png
//
@cmd randSound0 "chars/blackcat/somer1.wav" "chars/blackcat/somer2.wav"
frame data/chars/blackcat/free00.png
delay 2
attack 107 87 46 29 10 1 0 0 5 10
dropv 2.5 0.7 0
sound data/sounds/vuu2.wav
frame data/chars/blackcat/free01.png
delay 3
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/free01.png
attack 107 87 46 29 10 1 0 0 5 10
dropv 2.5 0.5 0
frame data/chars/blackcat/free01.png
attack 0
frame data/chars/blackcat/free01.png
delay 2
attack 94 53 60 73 10 1 0 0 5 10
delay 2
frame data/chars/blackcat/free02_1.png
attack 0
frame data/chars/blackcat/free02_1.png
attack 94 53 60 73 10 1 0 0 5 10
delay 3
frame data/chars/blackcat/free02_1.png
attack 0
frame data/chars/blackcat/free02_1.png
hitflash flash4
blast 94 53 60 73 125 10 0 0 10 10
frame data/chars/blackcat/free02_2.png
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/blackcat/free03_1.png
delay 6
frame data/chars/blackcat/free03.png
bbox 89 69 31 32
delay 12
offset 100 115
frame data/chars/blackcat/jump02.png
delay 40
frame data/chars/blackcat/jump01.png
bbox 88 84 33 42
delay 8
offset 100 124
frame data/chars/blackcat/jump00.png
frame data/chars/blackcat/free04.png
frame data/chars/blackcat/jump00.png
frame data/chars/blackcat/pain200.png


Basically, its just an attack with a follow. But on that follow, I bind the entity next to BlackCat, since OpenBOR doesn't have a built-in friction you can simple change the target velocity because it can pass through the player. I tried to use that script (I forgot the name of the author) which does this, but sometimes it fails so I made this way.
 
is it possible to switch to grab animation once enemy is within range after using slam script to pull them to your position? Here's an example of what I mean

https://youtu.be/fLFsaU0265A?t=1m59s
 
you can try grabin.

Code:
grabin {type} {distance}

    ~If this command is declared, next nonknockdown attackbox makes entity grab opponent in same manor as normal grab.
        0 = no effect (used to turn off grabin)
        1 = Opponent is pulled in while this entity doesn't move
        2 = Both entity and opponent are pulled each other splitting the distance
    ~{distance} controls how far entity and opponent would be when grabbing starts.
    ~Use this command with non knockdown attackbox of course.
 
I tried it out and grabin doesn't seem to work with the slam script because once the enemy is released from the slam with depost they automatically play their fall animation

this is how the animation is setup it works as far as bring the enemy within grab range its just once they're unbound with depost the move kind of falls apart because they automatically play fall anim any suggestions?

Code:
anim	follow4
	offset	36 199
	delay	20
	grabin	1 60
	@cmd	slamstart2
	@cmd	position 0 120 0 0 0
	frame	data/chars/Spiderman/ws5.gif
	delay	5
	@cmd	position 0 105 0 0 0
	frame	data/chars/Spiderman/ws3.gif
	delay	5
	@cmd	position 0 70 0 0 0
	frame	data/chars/Spiderman/ws2.gif
	@cmd	position 0 30 0 0 0
	delay	5
	frame	data/chars/Spiderman/ws1.gif
	attack	35 131 60 30 0 0 0 0 0 0
	@cmd	depost 0
	@cmd	clearL
	delay	5
	frame	data/chars/Spiderman/h1.gif
 
I'm just guessing, but maybe instead of depost, just unbind the entity and then perform grabin.

Code:
void unbind ()
// unbind entity
// 24.09.2013 - Douglas Baldan - O Ilusionista --- [url=http://www.brazilmugenteam.com]www.brazilmugenteam.com[/url]
{
void    vSelf   = getlocalvar("self");
bindentity(vSelf, NULL());
}

Or maybe you can force them into another animation.

Code:
void forceanim(int anim){
	void self = getlocalvar("self");
	void opp = getentityproperty(self, "opponent");
	changeentityproperty(opp, "animation", anim);
}
 
unbind isn't working How do I use force animation in character txt or someone has a solution to this once I depost the enemy they play out their fall7 animation and I don't want this to happen but I don't know any other options for this is there another way to bind the enemy and then switch to grab animation once they are in range?
 
Thegr8test said:
...is there another way to bind the enemy and then switch to grab animation once they are in range?

One of these days someone will pay attention ;)

Seriously, this is exactly what you are trying to do, and please don't ask me for a code sample, it is literally right there in the video.

https://youtu.be/Y_cM4tgqKFg
 
thanks dc I'll put it to use and a heads up I think there's a bug with grabin because it says that the next nonknockdown attackbox will trigger grab but it doesn't in some instance's both the player and enemy will be unable to move until I press jump and then both are freed I assume that a misread or something was taking place and this is in whatever build from dec 30 2013

Code:
grabin	1 40
	offset	36 199
	delay	20
	frame	data/chars/Spiderman/ws5.gif
	delay	5
	frame	data/chars/Spiderman/ws3.gif
	delay	5
	frame	data/chars/Spiderman/ws2.gif
	attack	48 138 40 63 0 0 0 0 0 30
	delay	5
	frame	data/chars/Spiderman/ws1.gif
	delay	5
	frame	data/chars/Spiderman/h1.gif
 
There's no bug in grabin, the manual is just wrong about what it's supposed to do. It does not and was never intended to work as the manual describes.

All grabin does is move the target within a given range on contact. That's it. The movement itself can sometimes trigger a grab, but that's just a side effect.

DC
 
Back
Top Bottom