Interrupting interpolate....

LBGLBG Member Posts: 277
edited November -1 in Working with GS (Mac)
Hi,

I was wondering if anyone else has had this issue. I am trying to recycle actors in my scene and have one that interpolates across the screen in a linear fashion that when reduced to 0 life needs to move off screen. The problem is that it does not. I currently have:

Gravity rule: Acceleration down
Bounce rule: Acceleration up (actor bounces across screen)
Move Rule: When self.pos.X < 0 interpolate self.pos.X to 510
Shoot rule: When actor posX is less than 500 shoot
Die Rule: When self.life = or is less than 0 change attribute self.pos.x to 510
Detect Cycle: When Random1-100 is > 80 and < 100 and self.pos.x is = 510 and game.difficulty > 1 change self.position to -25

Surely the above should work? I have it on other actors that move into the screen but not all the way across but that can't be the issue can it?

Thanks for any help

LBG

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi LBG, Interpolate can't be interrupted while it's doing it's thing, unfortunately. Maybe try Move To behavior, see how that goes.

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

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

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I beg to differ.

    Check out my demos http://gamesalad.com/p/tenrdrmer/games

    They is a scene preview demo that interrupts interpolate as well as a cancel interpolate demo. Its more trickery to make it seem interrupted but it works very nicely.

    Those demos are still on the old online publishing so I think you will have to search them inside GameSalad to actually download them.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    And actually I think in your case LBG I would just change the color to alpha if they die and let them keep on moving. Also and collision rules just add the condition alpha = 1 so they stop detecting when he's been killed.
  • LBGLBG Member Posts: 277
    Thanks for your help guys. Unfortunately if I use move it will affect the accelerate rules that I have. I'll try your advice tendrmer.

    Cheers

    LBG
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    tenrdrmer said:
    I beg to differ.

    Check out my demos http://gamesalad.com/p/tenrdrmer/games

    They is a scene preview demo that interrupts interpolate as well as a cancel interpolate demo. Its more trickery to make it seem interrupted but it works very nicely.

    Those demos are still on the old online publishing so I think you will have to search them inside GameSalad to actually download them.

    Thanks Aaron, I'll check out your demos with interest. :-)
    LBG said:
    Thanks for your help guys. Unfortunately if I use move it will affect the accelerate rules that I have. I'll try your advice tendrmer.

    Cheers

    LBG

    OK, LBG; sorry I couldn't help. I guess that using Move To would affect acceleration, although I'm surprised Interpolate doesn't! :-) Anyhow, hope you get it sorted; sure you will with tenrdmer's demos.

    Bump:
    tenrdrmer said:
    And actually I think in your case LBG I would just change the color to alpha if they die and let them keep on moving. Also and collision rules just add the condition alpha = 1 so they stop detecting when he's been killed.

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

Sign In or Register to comment.