Quote:
Originally Posted by cbk1994
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";