Behavior Is Crashing The Game


  • Posts: 2
I'm working on a behavior for a puzzle game where the player grabs a potion and uses it to heal a sick animal.  The player runs into the potion, so  it disappears and shows up in the HUD at the bottom of the screen in the inventory section. If the player runs into the squirrel before doing this then nothing happens. If they run into it after, then the squirrel jumps up and runs off screen.  But so far, the behavior has been crashing the game when I load that scene or walk to that scene from a different one.  Does anybody know how to fix this?

Thank you!


  • *
  • Posts: 2672
It should give an error code when it crashes (test it in Flash and it will surely give you an error code).

My guess is that you are getting a null reference error (1009) when you try to do something with an actor that doesn't exist. I recommend you use the print block in your code and check the console to see where exactly your behavior is crashing.
My Stencyl resources are available here:
Cutscenes, RPG Elements, Particles, Map System and many more.

Vaibhav Sangwan

  • Posts: 161
You have set, when small animal 3 hits small animal 3.
I think there's the problem.
Also, in the codes above, use the code
If("attribute" has value)
attribute has value code is found under attribute>functions(If I remember correctly).
Currently working on:-
Feedback will be really appreciated