Jump to content

More Scripting Trouble


clockout1

Recommended Posts

I am trying to get a creature to enable itself when the player enters a trigger zone. This is my current script-

 

Scn AABlademasterEnable

 

short triggered

short controlvar

ref parent

 

Begin onTriggerActor

set parent to getparentref

if triggered == 0 && controlvar == 0

parent.enable

set triggered to == 1

set controlvar to == 1

endif

 

end

 

The trigger zone is linked to the creature, so someone please tell me why it doesn't work.

Link to comment
Share on other sites

Why all the variables? You only need one. :P Also, it's "set triggered to 1", not "set triggered to == 1".

 

Scn AABlademasterEnable

short triggered
ref parent

Begin onTrigger Player

if triggered == 0
set parent to getparentref
parent.enable
set triggered to 1
endif

end

 

I'm not sure if parenting an NPC works, so if it doesn't simply change it to "[NPCref].enable".

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...