G
Goliath
Guest
This is something i came out to put player on desired states:
How to use it:
1 activates the flag / takeaction
0 nothing
Example:
@cmd flags 0 1 0 1 0 0 ---> Turns on jumping status
Still testing it though.
Code:
void flags(int idleflag, int jumpflag, int walkflag, int actionjump, int actionattack, int actionpain)
{
void self = getlocalvar("self"); // get self
if(idleflag == 1)
{ // Turn On idle flag
changeentityproperty(self, "aiflag", "idling", 1);
// Turn on idle status
changeentityproperty(self, "aiflag", "jumping", 0);
// Turn off jump status
}
if(jumpflag == 1)
{ // Turn On jump flag
changeentityproperty(self, "aiflag", "jumping", 1);
// Turn on jump status
changeentityproperty(self, "aiflag", "idling", 0);
// Turn off idle status
}
if(walkflag == 1)
{ // Turn On walk flag
changeentityproperty(self, "aiflag", "walking", 1);
// Turn on walk status
changeentityproperty(self, "aiflag", "idling", 0);
// Turn off idle status
}
if(actionjump == 1) // Turn On takeaction jump
{changeentityproperty(self, "takeaction", "common_jump");}
// Set jump status
if(actionattack == 1) // Turn On takeaction attack
{changeentityproperty(self, "takeaction", "common_attack_proc");}
// Set attack status
if(actionpain == 1) // Turn On takeaction pain
{changeentityproperty(self, "takeaction", "common_pain");}
// Set pain status
}
How to use it:
1 activates the flag / takeaction
0 nothing
Example:
@cmd flags 0 1 0 1 0 0 ---> Turns on jumping status
Still testing it though.