View Single Post
  #35  
Old 01-13-2014, 09:18 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
Quote:
Originally Posted by cbk1994 View Post
Post the code that's handling the triggers.

Have you tried debugging to see where the problem is? Add echoes to the for loop to see what NPCs it's finding, and another inside the if-statement to see if the right NPCs are being considered baddies. If you haven't already, add echoes in the trigger receiving function to see if it's received at all. Add echoes before the for-loop to see if it's even being reached. When you do this it will become clear where the problem is (e.g. is the problem finding NPCs? is it identifying the right NPCs? is it triggering the NPCs?). You can't have too many echoes when debugging.
It was a dumb problem I overlooked. In the baddie's CLASS, I had
PHP Code:
baddietype "normal"
where I needed:
PHP Code:
this.baddietype "normal"
Reply With Quote