Enable/disable turnscript based on cloned object's attribute. What am I doing wrong?

foreach (obj, GetDirectChildren (player.parent)) {
  if (HasAttribute(obj, "ehp")) {
    obj.attacking = false
  }
}

With this code I'm trying to:
Check if an object has the attribute "ehp" (enemy health points).
If it does it's an enemy that's automatically attacking on sight.
I want make the enemy stop attacking ('cause the turnscript is enabled when I'm wearing an enemy uniform)

I'm going slightly mad here.


Oh ffs... nevermind. I had another turnscript that did the exact same thing but... you know.... the opposite.


Log in to post a reply.

Support

Forums