aggression adjustment

Modify this but change it to aggression property, use search on forum for examples of other scripts with aggression
Code:
@script
    void self = getlocalvar("self"); //Get calling entity.
    int MHealth = getentityproperty(self,"maxhealth");
    int Health = getentityproperty(self,"health");

    if(Health <= MHealth*2/3){
      changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
    }
@end_script
 
Thanks I will try to use them best I can...... could I do the adjustment by a by percentage scale as well as well?z

if(Health <= MHealth*30%){


?
 
Use search, really its faster
Code:
void lifeCheckP (int Percent, void Ani)
// Check the life and change the animation if the health falls below defined percentage
// Douglas Baldan - 04/11/2013
//update by Bloodbane - 18/11/2017
{
     void self = getlocalvar("self");
     int MHealth = getentityproperty(self,"maxhealth");
     int Health = getentityproperty(self,"health");

      if(Health*100 <= Percent*MHealth){
        changeentityproperty(self, "animation", openborconstant(Ani));
      }	
}
 
Hmmm so this would go into the characters text file......I kind of understand parts of it I'm not sure where exactly it would go. I  did find things searching but guess I need more tutorials....still lost.  :-\  Thank You
 
I suggest setting the script in IDLE animation like this:
anim idle
@script
    void self = getlocalvar("self"); //Get calling entity.
    int MHealth = getentityproperty(self,"maxhealth");
    int Health = getentityproperty(self,"health");

    if(Health <= MHealth*0.3){
      changeentityproperty(self, "aggression", 50);
    }
@end_script
...

The effect might be subtle so you might need to pay attention more to see the change
 
Back
Top Bottom