clockout1 Posted January 31, 2010 Share Posted January 31, 2010 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 triggeredshort controlvarref 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 More sharing options...
Argomirr Posted January 31, 2010 Share Posted January 31, 2010 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 More sharing options...
clockout1 Posted January 31, 2010 Author Share Posted January 31, 2010 Got it. In case you couldn't tell, I'm incredibly new to scripting. Link to comment Share on other sites More sharing options...
Argomirr Posted January 31, 2010 Share Posted January 31, 2010 No problem, learning how to script isn't easy. :) If you run into another problem, just ask. Link to comment Share on other sites More sharing options...
Recommended Posts