Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Positions Everyone - what is the best move?

rivetopiarivetopia Posts: 12Member
edited November -1 in Working with GS (Mac)
I have a dozen actors that I would like to move into position when a button is clicked.

The effect is like a burst. All actors start from the same position and then move to a unique position from there.

My 'show' script is simple:
When attribute, '' = 1
change attribute 'self.Position.X' to 'game.initX'
change attribute 'self.Position.Y' to 'game.initY'
MoveTo position x, y, relative to scene, speed 500, run to completion
if 'self.Color.Alpha' < 1
constrain attribute 'self.Color.Alpha' to 'self.Color.Alpha'+0.1

The problem is, the script is unreliable. Intermittently one or more actors will move past their target and off the screen.

Varying the speed of each actor helped but did not fix.

So.... I then move to a test file.
The difference is instead of all actors starting off screen with unique instance of MoveTo final x, y, I start the scene with them all in their final positions (which I assume is not a good solution for a final product)

The actor script initializes its self attributes, with its current position to self.finalX, and self.finalY
then moves offscreen to wait for the click, to run same script above.

The same thing happens. It takes many clicks to for it to happen, but it does. And funny thing this time it happened when my computer chimed on the hour.

So, is there another way to make this work?


  • quantumsheepquantumsheep Posts: 8,188Member
    Just a quick thought...

    If you have to put these actors into their initial positions, before moving them away and then *back* to their initial positions, you could 'hide' the actors under another graphic that encompasses the screen. This would then disappear when you call the actors to arms! ;)


    QS :)

    Dr. Sam Beckett never returned home...

  • rivetopiarivetopia Posts: 12Member
    Thanks QS, but I am really stumped on the wandering actors. Is this a bug? what is another way to make a character move from point A to Point B, and not go beyond?

    Could I have all actors position within another actor and have them stop when they hit the wall?
  • harrioharrio Posts: 234Member
    what's cookin,

    hey riv, check out the wiki about different movement types.
    the first entry discusses which types to use in certain situations.

    also, do they have to 'move' to their unique positions or can they just all appear there instantly? if they can, then you can just chg attr their xy positions and the will 'pop' to where you want them.

    hope that helps.

This discussion has been closed.