Multi spawn, how do I manage that actor?


  • Posts: 88
I'm currently using repeat X amount of times to handle spawning the "Hearts" actor for my hud display.  The only problem I'm having with it is finding out how do I manage or access that actor?

When the game starts Link has 3 hearts and 3 heart containers so 0.25*Container_HP*Hearts=12 (start with 3 times 4(container_hp) and 0.25 is 1 frame and there's 4 frames in a active heart the 5th frame is for dead hearts)

I'm currently using the switch frame to the last created actor but that will just manage the last created actor not the actor before that or the actor before that.

I guess I could make 4 checks per 1 heart but 20X4=80 and that's a lot of checks..

The way I have it now would work ONLY if I could manage previous actors not just the last created actor..


  • *
  • Posts: 2245
You can have one animation for each amount of heart containers (one animation with 3, another with 4 etc). Each animation would be the hearts "going down" (0 being all hearts empty).

You then switch the animation of the hearts meter to the amount of heart containers, and set the current frame to current health. Also, you 'll have only one actor, instead of various for each heart.

This doesn't actually solve your question, it's just how I did this.
My Stencyl resources are available here:
Cutscenes, RPG Elements, Particles, Map System and many more.


  • Posts: 16
Scene > Actors > Get Actor has a block which can give you the last created actor.
Attributes > Lists > Add/Insert has a block which lets you push that actor into a list.

Do this right after you spawn each heart, and you now have a list containing all of them.