Actors Flying Off Screen! OMG!

mooshoesmooshoes Member Posts: 3
edited November -1 in Working with GS (Mac)
Entirely at random, my actors will go flying off the screen uncontrollably. The only movement behavior they have is to move 40 in any given direction. i thought it might be because I was clicking (tapping) too fast, but I got it on my first click on my last try. Is there a way I can stall everything else in the game until my actor finishes moving? Only one thing can move at a time, so it's not like it would mess with the experience. Thanks in advance for the ideas.

Comments

  • JoshKahaneJoshKahane Member Posts: 470
    Well one easy thing to do is make a new actor which will be an invisible wall. It will have 0 alpha and visible un-ticked and also have moveable un-ticked. Also then just add a collide rule so that the wall collides with all the objects which are going off screen and place your walls around your play area. Ta da. Now all your actors will stay on screen.

    Im not sure about the movement though.
  • KamazarKamazar Member Posts: 287
    Go through your code and check up on every actor that interacts with the one flying off the screen. Maybe it's colliding with an invisible actor that has a high restitution.
  • mooshoesmooshoes Member Posts: 3
    Thanks for the tips...I ended up having to go through and entirely change the way my actors were moving. It is a sliding puzzle style game, and the actors had to be constrained unless they were right next to the empty space. So....I changed the logic on how they move from the usual "move to" to just changing the location attributes. Each piece only moves 40 pixels at max, so it still provides a good effect for movement.

    Thanks again for all the tips. I'd rather fiddlefart around in this thing than tear my hair our with traditional code any day.
Sign In or Register to comment.