Menu Problem

UnicornInvasionUnicornInvasion Member Posts: 301
edited February 2012 in Working with GS (Mac)
I have a timer Move to rule. After 0.5 seconds Move to (Position). And Run to completion is clicked. And sometimes it just runs past the spot.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited February 2012
    Don't use Move To, use Interpolate.
  • poopdecksweeperpoopdecksweeper Member Posts: 180
    instead of move to use interpolate and move Self.position to whatever place

    hope it helps
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @UnicornInvasion

    Firstly, good advice from @Braydon_SFX and @poopdecksweeper, but:

    I'm curious; I notice that your Y value (and your X) are not precise, pixel-wise. Perhaps do a little experiment to make these whole numbers - delete the .5 in each case - and see if the glitch still happens; if it's OK then, it must be that Move To behaviour just gets confused... (trying to move to half a pixel...)

    ----------------------------------------------------------------------------
    iPad app: End of the Earth –•– http://davidgriffinapps.co.uk/
    ----------------------------------------------------------------------------

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Oh, good idea, Gyroscope.
  • poopdecksweeperpoopdecksweeper Member Posts: 180
    ahhh!
  • calvin9403calvin9403 Member Posts: 3,186
    move to has benn buggy since I am here, just use interpolate for it
  • SAZ_1SAZ_1 Member Posts: 397
    yea move is probably the worst function to use .. alternatively add in an additional rule if self.posY is >= ?? ... constrain self.pos Y to ??? ... so just constrain the Y not to go anywhere higher than its proper position that might help ... but personally i wouldnt use the move rule.
  • MotherHooseMotherHoose Member Posts: 2,456
    all good advice you got there!

    I woud suggest that you don't bother with timers …
    Rule: when
    Attribute: self.Time = 0.5
    --Interpolate: self.Position.Y

    good to remember that the device always tracks:
    game.Time … from game loaded
    scene.Time … from scene loaded
    individualActor.Time … from the time the actor is loaded in the scene … sceneLoad or spawned

    @};- MH
Sign In or Register to comment.