Hungry, Hungry

GingerBGamesGingerBGames Member Posts: 390
edited November -1 in Working with GS (Mac)
Hello GS'ers,

I was curious if anyone could lend a hand with something. I want to make a Hungry, Hungry Hippo type game. For the love of me, I can't figure out the rules to get the hippo to work. I want to tap the hippo, then the hippo goes out for a second and "grabs" it's food, then it comes back.

I've tried putting a Timer rule in there, but this didn't work. Does anyone know of how to accomplish this? Tutorials, demo's anything anyone can point me to? I've searched wiki, and also the tutorials online.

If you go to my Gamesalad page, i've got a demo of what i've got so far, and believe me, it's not at all what i'm doing i'm just trying to get the actors down, so it looks really bad. But it get's the job done for what i'm trying to accomplish for a final product.

Thanks,
GBG

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I would use the Interpolate behavior. Interpolate the head and neck of the hippo to a certain X or Y coordinate. Add Timer and another Interpolate to bring the head back.

    Let's say the hippo is at the bottom of the screen:

    Rule
    When all conditions are valid:
    Touch is pressed
    -----Interpolate: self.Position.Y To: [some y position] for 1 second
    -----Timer After 1 second run to completion
    ----------Interpolate: self.Position.Y To: [original y position] for 1 second

    That's the basic logic of it.
    You'll need to add some logic in there so you cannot touch the hippo when its moving, etc...
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    instead of timer you could check for posiiton. so if you are interpolating to an X of 100 to bring it back you could have a rule that says

    when posiitonX = 100
    --interpolate x to 50

    obviously the 50 and 100 will be different

    Just a way to avoid a timer.
  • GingerBGamesGingerBGames Member Posts: 390
    Thank you both for the tips, i'll try those.
Sign In or Register to comment.