custom bounce off from entity

ABK

Well-known member
I have attack in jump animation and when it hits entity on ground then character is attacked by entitys attack in pain animation , i have it set as attack3 and fall3 in player is the bounce off anim but when i land then i cant move, i tried aiflags but none of them makes my character move again after landing.

I have one bounce effect for every enemy,  attack in jump animation has follow but its different kind of bounce and lower one - just regular bounce, i want to get higher special bounce but only when you jump on one particular entity, i tried to do it using fall animation but character is stuck after landing.
What do i need to change to unlock him ?
 
when the character freezes use a self damage script on that land frame to unlock them.  just to be sure it is a enemy who is getting frozen right ?
 
player is frozen because hes in fall animation that has bounce off frames , when i change aiflags and animation it freezes,  i just want him to land normally from this bounce/fall animation and not to fall to the ground like from normal fall.
--------
i fixed it, used performattack in fall animation ;D
 
it doesnt freeze now cause i used performattack instead of change animation.
anyway heres fall
Code:
anim   fall3
		@script
                void self = getlocalvar("self");
                			if (frame == 1){
                 performattack(self, openborconstant("ANI_FOLLOW3"));
		}
	@end_script
	loop	0
	offset	139 234
	bbox	0 0 0 0
	delay	1
	frame	data/chars/turt/j1.gif
	frame	data/chars/turt/j2.gif
	frame	data/chars/turt/j2.gif


Code:
anim	follow1
		@script
                void self = getlocalvar("self");
                                int iPIndex = getentityproperty(self,"playerindex"); //Get player index
                void p1 = playerkeys(iPIndex, 0, "moveright");
                void p2 = playerkeys(iPIndex, 0, "moveleft");
			if (frame == 0){
		                changeentityproperty(self, "takeaction", "common_jump");
		                 changeentityproperty(self, "aiflag", "jumping", 1);

		}
				if (p1){
		changeentityproperty(self, "velocity", 4 );
		}
		if (p2){
		changeentityproperty(self, "velocity", -4 );
		}
	@end_script
	subentity	spark
	spawnframe	4 -20
	throwframe	1
	cancel	4 11 0 J freespecial1
	cancel	3 11 0 D A freespecial3
	loop	0
	offset	139 234
	delay	1
	jumpframe	0 11
	followanim	2
	bbox	116 141 50 92
	attack	0 0 0 0 0 0 0 0 0
	frame	data/chars/turt/j1.gif
	delay	6
	sound	data/sounds/jump.wav
	frame	data/chars/turt/j2.gif
	frame	data/chars/turt/j3.gif
	frame	data/chars/turt/j4.gif
	bbox	116 141 50 60
	hitfx	data/sounds/get.wav
	attack	120 177 35 56 10 0 1 0 0 0
	frame	data/chars/turt/j5.gif
	frame	data/chars/turt/j6.gif
	frame	data/chars/turt/j7.gif
	frame	data/chars/turt/j8.gif
	delay	50
	frame	data/chars/turt/j9.gif
 
I don't think you need script for this. Cant you just use a follow animation for the bounce effect. Use a jump attack that's followed buy a animation that has a jumpframe. so when the jump attack connects the animation immediately switches to the follow animation the jumps the player in what ever direction you decide.

If this is what you meant by bounce effect
 
Back
Top Bottom