Using move to instead of interpolate?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
Hey,

I want to use move to instead of interpolate. I know interpolate is amazing but I want
to use move to.

So I want an actor going up and down so I said:

move to y position 200

rule:when self position y = 200
move to y position 85

But the actor stops at 200 and does not go down ://

Thanks for help

Comments

  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Move to is full of bugs and doesn't work 99.9% of the time. Interpolate is much better.

    Start your actor at Y position 85.

    Rule: When attribute self.positionY = 85
    --Interpolate self.positionY to 200

    Rule: When attribute self.positionY = 200
    --Interpolate self.positionY to 85

    This should give you the up and down movement you're looking for.

    ________________________________
    【ツ】iPhone Icon Pack (compatible with DBA Icon Creator) 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demos: High score simple and advanced; Game Center; App Rating System; Custom Font Score and Countdown; Advanced Snap to Grid
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Yeah but interpolate doesn't work with the new update!
    First I had exactly your rules but I don't want them this time!!!!!!

    And it is the only behavior in my game (with new version) that fails....So I want to eliminate this bug..

    thx
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, try using equal to and >, as well as equal to and <, depending which direction the actor's going.

    ----------------------------------------------
    http://davidgriffinapps.co.uk/
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    If you're trashing interpolate only due to the recent bug maybe you should consider to wait till they fix it. Interpolate is the best and a fix should be out very soon. If you really are in a hurry you can try to wrap the interpolate rules in a timer.

    ________________________________
    【ツ】iPhone Icon Pack (compatible with DBA Icon Creator) 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demos: High score simple and advanced; Game Center; App Rating System; Custom Font Score and Countdown; Advanced Snap to Grid
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Yeah but I have to set fixed y positions or?

    I want him to move from 85 to 250.

    Still doesn't work...
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    But then there is another problem :/ Everything using accleerate or move to needs moveable on which causes that when my actor collides the other get's thrwon away^^

    Is there no way to solve this problem... I want to publish my game :) it is just the interpolate problem...

    thx
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    MarkOnTheIron said:
    If you're trashing interpolate only due to the recent bug maybe you should consider to wait till they fix it. Interpolate is the best and a fix should be out very soon. If you really are in a hurry you can try to wrap the interpolate rules in a timer.

    ________________________________
    【ツ】iPhone Icon Pack (compatible with DBA Icon Creator) 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demos: High score simple and advanced; Game Center; App Rating System; Custom Font Score and Countdown; Advanced Snap to Grid

    Interpolate can't be interrupted, so although it's useful for many things it's not best for all situations. I use the move behaviour and generally don't have problems with it. I'm more likely to have stuff go wrong with accelerate. (Sometimes stuff keeps accelerating by tiny amounts even when the condition telling it to accelerate is not met!)

    @Alex If you'red doing something simple you might be better off using the change attribute behaviour which, in general, is better for performance and GS updates won't mess you up.

    So:

    when self y position is equal or less than 85
    change self linear velocity y to 100 (or whatever speed you want)

    when self y position is equal to or more than 200
    change self linear velocity y to -100
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Thank you :)

    But just one problem, when I tick off moveable the actor can't move as in interpolate ://

    I want an other actor to stand on it

    thx
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Just use interpolate. uncheck movable and use greater than or equal to and less than or equal to. I personally have no issues with interpolate right now. i'm not sure why you are having issues with this but for what you want its the best route. I suppose you have other conditions on your rules that maybe killing it. Why don't you post your exact interpolate rules and maybe we can offer you some more advice.

    @Honey Tribe. Look at my Demos. interpolate cannot be Stopped but you can override it to make it appear as such.
  • SnapFireSnapFire Member Posts: 361
    My interpolate is working great. Hm...

    There is the easy solution of putting a rule inside of a timer that is "Every 0.1 seconds" or something. Then, inside the rule just put a change atribute self.position.y to self.position.y +1

    This isn't the best solution obviously, but it might work in your situation. Also, it can be stopped at any time if you put the whole thing in another rule.

    Hope that helps,
    -Thomas
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    And have you tried interpolate at all? Some bugs are prominent for some people, and it's not for others. Some people have interpolate/timer issues, and some don't. Some have constrain actor/camera issue and some don't.

    It seems like it's dependent on what version of GameSalad you used when creating the original file. At least to me it does. I personally don't have interpolate issues, that all works as scripted, but I have timer issues where they just don't work at all, for anything.
Sign In or Register to comment.