Move to does not stop?

xactoxacto Member Posts: 146
edited November -1 in Working with GS (Mac)
I currently have my actor (play button) move into place from the right of the screen. It is suppose to stop when it hits 425. It works EVERY TIME with in the GS Application, however on the web and the iphone it will sometime flys by off the screen to the left - never stopping where it should.

Here is the code:
After 3.7 seconds
Move To postions x 425; y 42, Relative to scene, speed 600

Seem very simple. Again, it works sometimes and others not so much.

I even tied the following:
After 3.7 seconds
Rule: if attribute self.postions.x >=425 then
Move To postions x 425; y 42, Relative to scene, speed 600

Any ideas why my actor would fail to move to the write spot and stop?

Xacto

----------------------------------------
StarFire
http://gamesalad.com/game/play/8901

Comments

  • xactoxacto Member Posts: 146
    ...anyone.... bueller.... bueller...

    Com'on, Quantum knows..... :)
  • quantumsheepquantumsheep Member Posts: 8,188
    Quantum does not know!

    Sometimes I just get bugs like this with no way that I know of to fix them!

    e.g. - an enemy gets hit, an explosion happens... and the enemy's still there instead of being destroyed!

    It happens so infrequently that I didn't think of mentioning it. I can see though that this would be a bigger problem at your end!

    Sorry I can't help on this one, dude!

    Cheers,

    QS :(

    Edit - Additionally, I had a very simple collision detector that crashed the entire game. All it did, literally, was detect if you'd hit a tree.

    Codemonkey knows about that one though, as it's pretty vital to the game ;)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    CodeMonkey is in 'Talk Like a Ninja Mode'.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    QS, is the crash repeatable? If so, what rules combination causes it?

    Not sure about the Move To xacto. Its a hard one to pinpoint the reason why it does what it does since its not consistent.
  • xactoxacto Member Posts: 146
    This is very simple code, so is this a bug? Why does this happen more on the iphone?

    The main issue is; I have four buttons and when I run the game on the iphone, I usually will be able to select only one. All the others fly by.

    Xacto

    ----------------------------------------
    StarFire
    http://gamesalad.com/game/play/8901
  • quantumsheepquantumsheep Member Posts: 8,188
    Codemonkey - it's the game with the throttle - still having the same issue with it. It's not a major concern right now, but thought it'd be nice to get the game out soonish for a laugh - when I've finished the current two I'll ask again! ;)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have had A LOT of inconsistencies with jumping. Here's my code:

    All conditions must be true:

    space bar down
    main actor overlapping with actors of tag "floor"

    accelerate (90 degrees ....)

    On some platforms with the "floor tag" it will jump on others my main actor will just stand there. These are exactly the same floor actors and everything. Totally inconsistent - can't figure it out.
  • quantumsheepquantumsheep Member Posts: 8,188
    I know what you mean.

    My brief foray into a platformer of sorts had my character jumping up and being able to jump again mid-jump. It's very weird and that idea's been put on the back-burner for now! ;)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    well, I put in the second condition about overlapping with the platforms so that you can only jump when the actor you are control is touching the platform. That keeps the person from using the jump button as a fly button. But I cannot for the life of me figure out why my player will sit there, clearly touching the platform, while I pound the spacebar into oblivion. then I'll move him over to another platform and move him back to the one that wasn't working and out of the blue it will work (some of the time). Crazy! or at least it is driving me crazy.

    Codemonkey - Help!
  • ARC_GamesARC_Games Member Posts: 78
    scitunes said:
    well, I put in the second condition about overlapping with the platforms so that you can only jump when the actor you are control is touching the platform. That keeps the person from using the jump button as a fly button. But I cannot for the life of me figure out why my player will sit there, clearly touching the platform, while I pound the spacebar into oblivion. then I'll move him over to another platform and move him back to the one that wasn't working and out of the blue it will work (some of the time). Crazy! or at least it is driving me crazy.

    Codemonkey - Help!

    I am also working on a platformer and have experienced this same problem (sometimes while on a platform the actor will jump, other times it will not respond, and when in contact with more than one platform simultaneously nothing happens & the game crashes). This problem is caused by a bug within gamesalad. I have notified them about it, and explained to them why it behaves in the inconsistent and unintended manner in which it behaves.

    I'm trying to figure out a way to work around the bug, and as long as I don't allow the actor to jump or walk while on moving platforms (i.e. elevators) where the platforms get close enough for the actor to contact more than one platform at a time, then I can get it to work correctly.
  • SingleSparqSingleSparq Member Posts: 1,339
    Seemed to gotten off track to xacto's issue. I've the same issue. To alleviate the problem I've put an invisible non movable block with collision to stop the sliding menu items on mine. Also had to put a timer to delay the movement as the menu actors would be already in place when the screen came up.
  • ORBZORBZ Member Posts: 1,304
    MoveTo has been known to be buggy for quite a while. I attribute this bugginess to fractional positions not lining up with integer screen coordinates.

    For example. If your actor moves at 45 degrees his position is going to be at some point x.5 and y.5. This can cause the actor to overshoots it's target and then the MoveTo code just runs forever.

    I have an example in my profile of how to do always reliable MoveTo behavior using distance, velocity, and time.

    The demo is called Shoot XY (or something like that)
  • OrchestralMonkeyOrchestralMonkey Member Posts: 33
    I had the same issues with 'Move To'. I gave up trying to use it and used 'Interpolate' instead. Worked the same in my situation.
  • netdzynrnetdzynr Member Posts: 296
    I will second pianoo's suggestion -- avoid 'move to' and use 'interpolate'. Two benefits: 1) you can get more organic motion if you want using the ease options (ease in, ease out) and 2) interpolate is way more reliable than move to.
Sign In or Register to comment.