forcing a landing

NED

Well-known member
For the coding of a move, I need a way to force the landing of a move.
Is it possible to decide for a particular frame to immediatly send player to the ground.

Exemple:
Jump attack (still in air)
on 3rd frame imediatly meeting to ground without changing animation

Thanks
 
nedflandeurse said:
For the coding of a move, I need a way to force the landing of a move.
Is it possible to decide for a particular frame to immediatly send player to the ground.

Exemple:
Jump attack (still in air)
on 3rd frame imediatly meeting to ground without changing animation

Thanks

If (frame==3 && a > base) changeentityproperty(self,"position",NULL(),NULL(),base);
 
Thanks.
For debug purposes I used finally frame 2.

I tried to use the code, but Openbor don't loads.
I added it on the start of an animation. (just in a normal way)

I tried these various ways but none of them works for me (syntax might be wrong)

Code:
@script
	If (frame==2 && a > base)
	changeentityproperty(self,"position",NULL(),NULL(),base);
@end_script

Code:
@script
    void self = getlocalvar("self");
	If (frame==2 && a > base)
	changeentityproperty(self,"position",NULL(),NULL(),base);
@end_script

Code:
@script
    void self = getlocalvar("self");
	If (frame==2 && a > base){
	changeentityproperty(self,"position",NULL(),NULL(),base);
	}
@end_script
 
Ned, have you declared what "base" and "a" means before you call then?

void self = getlocalvar("self");
int a = getentityproperty(self, "a");
int base = getentityproperty(self, "base");
If (frame==2 && a > base)
{
bla bla bla bla
}
 
Bloodbane said:
Are you using new build?

I'm using Build 3769
Newer builds make my hopback move really buggy. (imput B + S)

O Ilusionista said:
Ned, have you declared what "base" and "a" means before you call then?

void self = getlocalvar("self");
int a = getentityproperty(self, "a");
int base = getentityproperty(self, "base");
If (frame==2 && a > base)
{
bla bla bla bla
}

I finally edited it and tested it.
Also fixed the little typo "If" instead of "if".
It works perfectly.

Code:
@script
	void self = getlocalvar("self");
	int a = getentityproperty(self, "a");
	int base = getentityproperty(self, "base");
	if (frame==2 && a > base){
	changeentityproperty(self,"position",NULL(),NULL(),base);
	}
@end_script


Thanks a lot to all of you.
This will make me fix a problem on a super move I had for almost one year.
 
Back
Top Bottom