changig hostile to player/enemy

jonsilva

New member
hello

anyone knows how to change an NPC entity hostile to enemy and player //
and only to player... with script

ive tried using
@script
if(frame==1)
{
  changeentityproperty(getlocalvar("self"), "hostile", openborconstant("TYPE_PLAYER"));
}
@end_script

but nothing seems to happen the npc keeps hitting the enemies
also
tried the hypnotize script but it didint worked

void hypnotize()
{
      void self = getlocalvar("self");

        changeentityproperty(self, "hostile",openborconstant("TYPE_ENEMY")-openborconstant("TYPE_PLAYER"));
        changeentityproperty(self, "candamage",openborconstant("TYPE_ENEMY")-openborconstant("TYPE_PLAYER"));
}


 
Is it possible for your situation to just make a weapon char for the NPC that has it's own hostile setting, and just use weaponframe to change to this weapon?


 
Back
Top Bottom