Need help attaching 2 actors


  • Posts: 1
I'm making a prototype where I attach a separate head actor onto a body actor, I tried using the code from 2012 but all I got is this
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at MethodInfo-10054()[C:\Users\Joshua\AppData\Roaming\Stencyl\stencylworks\games-generated\Run and Shooty Prototype\Source\scripts\ActorEvents_62.hx:84]
   at com.stencyl.models::Actor/innerUpdate()[C:\Program Files\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\models\Actor.hx:1558]

   at com.stencyl::Engine/update()[C:\Program Files\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2683]
   at com.stencyl::Engine/postUpdate()[C:\Program Files\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2839]
   at com.stencyl::Engine/onUpdate()[C:\Program Files\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2831]


  • *
  • Posts: 4627
You need to set the MONKEY actor attribute to an actor before you call that code. If you're not sure how to do that, posting your entire behavior may make it easier for others to help you.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)