Needed help with a problem with 'island jumping'

BasGoodboyBasGoodboy Member, PRO Posts: 310
edited April 2014 in Working with GS (Mac)

Hey all,

As you can see in the printscreen below, the white block is supposed to be the hero player, the black blocks are islands, which are moving in a row from up to down, be destroyed, and spawn new ones which will come from up to down again.

The island actor got a touch on click > spawns hero rule, which will spawn the hero on click on the island
the hero got a destroy rule, so that each time the player clicks, the hero will be destroyed and respawns on the island clicked. This works very nice.

My problem:
I want the hero not to be able to jump on the second row of islands, and only be able to jump to the next row of islands.
Each row of island are 3 actors; island1; island2 and island3.

Small solution:
I have made a small solution, being: the island actor got a touch on click > if island actor position < 350, so the actor can only click on the island if it's below Y350 position, so there is no possibility the player can click a second row of islands, but this isn't the ultimate way, since players be delayed by this. ANY IDEAS PLZ?

Image and video hosting by TinyPic

Goodboi Gamestudios | Monster Jumper now on the App Store

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Why is that delaying the player?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    @tatiang because the player can only click now when the islands are very low (Y=350), so there is no speed in it, and the player can't island jump to the next row any faster then that the next row of islands is at the Y=350 coordinate. If i put the Y coordinate higher the player can still reach the second row of islands incoming. Hope you understand what I mean.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Anyone?

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    I really need this to work for my game, and I really can't figure it out. Bump.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    rather than spawning everything...

    could you change it so when the islands get to the bottom, y position below -10 then change their y position to 1024 (or whatever y position works).

    This way you could have your islands numbered. i.e. self.number = 4.

    And only allow the player to touch islands which have a certain self.number or below.

    Also for the hero actor, when you press an island have their x and y position change rather than being destroyed and spawned. It's not essential but should make for tidier code.

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    I fixed it!

    Goodboi Gamestudios | Monster Jumper now on the App Store

Sign In or Register to comment.