Bruce
Active member
Hello everyone,
Can someone please help me understand these scripts?
They were used in the go_bys, but I don't understand what they are or how they work.
storeXvel function was used in the jump animation.
Thank you very much.
Can someone please help me understand these scripts?
They were used in the go_bys, but I don't understand what they are or how they work.
storeXvel function was used in the jump animation.
Thank you very much.
Code:
void storeXvel() {
void self = getlocalvar("self");
int side = (getentityproperty(self, "direction")== 0) ? (-1) : (1);
setlocalvar("xVel" + self, getentityproperty(self,"xdir")*side);
}
/*
* retrieves X velocity in a local var,
* stored by storeXvel()
* created by Don Drago
*/
float retrieveXvel() {
void self = getlocalvar("self");
return getlocalvar("xVel" + self);
}