imune to a specific attack

O Ilusionista

Captain 100K
Hi
I use a script to change my character map to a hit map everytime he got hit.
To avoid this map override the frozen map, I've added a extra line to check it.

Now, I need to make it check for ATTACK4 (venon), but isn't working. What I am doing wrong?

void main()
{// Blink effect script
    void self = getlocalvar("self"); //Get calling entity.
    void Health = getentityproperty(self,"health");
int Type = getlocalvar("attacktype");

if(Type != openborconstant("ATK_FREEZE") || Type != openborconstant("ATK_NORMAL4")){
if (Health > 0){
changeentityproperty(self, "colourmap", 6);
changeentityproperty(self, "maptime", 20 + openborvariant("elapsed_time"));
}
}
}
 
Looks good to me. What I would do is add a some debug logs, run the game and then check the values you are getting (quick tip: open the log in a web browser, then you can just refresh it as you play to see ongoing log). Then you know 100% if the issue is in your evaluator:

Code:
void main()
{// Blink effect script
    void self = getlocalvar("self"); //Get calling entity.
    void Health = getentityproperty(self,"health");
   int Type = getlocalvar("attacktype");
   int freeze = openborconstant("ATK_FREEZE");
   int atk4 = openborconstant("ATK_NORMAL4");
   
   log("\n\n Type: " + Type);
   log("\n freeze: " + freeze);
   log("\n atk4: " + atk4);

   if(Type != freeze || Type != atk4){
      log("\n Attack eval True");
      if (Health > 0){
      log("\n Health eval True");
      changeentityproperty(self, "colourmap", 6);
      changeentityproperty(self, "maptime", 20 + openborvariant("elapsed_time"));
      }
   }
}
 
Back
Top Bottom