(Solved) Creating Actors on a moving actor.

Leitca

  • Posts: 16
Well, im trying to make presents spawn where Santa is every few seconds. I have tried to figure it out but all my efforts failed. They either spawned a jagillion or so presents or made the test player freeze and another attempt spawned them way low from where it should have been. I try and post a picture of my catastrophe if i figure it out.
 Could someone tell me how to put a picture of the behavior up so i can show everybody my failure.

« Last Edit: January 09, 2012, 09:58:20 pm by Leitca »

Alexin

  • *
  • Posts: 3127
Take a screenshot (camera icon on the bottom-right) and attach it to the post.
"Find the fun"
alexin@stencyl.com

Leitca

  • Posts: 16
Well lets try it.

Miasmos Games

  • Posts: 878
The problem is that you're telling the game to start a new "do every x seconds" loop a lot. Usually you only use these loops in the create event as every single time you create one it will be executing the code inside it every x seconds no matter how many you've made, and you're making one each time the variable=true. I would try changing it to "do after x seconds" as with the code you have this should work. With the odd spawning of things I think it's because you have the x of the actor being used for the y spawn variable in the "create actor" blocks for gift 1 and 3.

Cupcake Bounce

Leitca

  • Posts: 16
Thanks for the help, it works now. I really appreciate it. I must have been really tired when i did this because I didn't notice the messed up Y's.  :D