Hi again, I'm now working on my old mod (personal one, can't share it here due to being +18, and not for violence) and I'm in a roadblock with an OTG script by @msmalik681 for use in a stomping OTG move. But I want to give that ability to enemies too, so I can't put it in keyscript.c. I need to know where it should be for the player to be affected by an enemy OTG move. Here's @msmalik681's code without player input:.
Thanks in advance!
Code:
#define OBC openborconstant
#define GEP getentityproperty
#define CEP changeentityproperty
#define SLV setlocalvar
#define GLV getlocalvar
void self = GLV("self"); //Get calling entity
void exists = GEP(self, "health")>1?1:NULL(); // Is caller alive
if (OBV("in_level") && exists)
{
//Stomp attack
void target = findtarget(self, OBC("ani_freespecial15"));
if( target && GEP(target,"aiflag","drop") && // check if target valid and has been knocked down
!GEP(target,"aiflag","falling") && // check if no longer falling
GEP(target,"health") // check if still alive
){ // otg stomp attack
CEP(self, "velocity", 0, 0, 0);
performattack (self, OBC("ani_freespecial15"));
}
target = NULL();
}
}