How do I make a Button Pathfinder

0 favourites
  • 6 posts
From the Asset Store
A short demo of template sold on store, with formations on end of way for no overlaps.
  • Hello , i have an idea to build a game where u need to follow a path to the End.

    So my Problem is, i have 3 Lines where 2 of them are not possible to get to the End. I have 2 obstacles on start of the layout what people can see 3 Seconds to look whats the right path. If he click like on 1 the player should go to the end of path 1 2 he should go to path 2 who is maybe wrong and failed. Cant descripte it so good in English, sorry! But if i make an Event where they need to press maybe an Button to follow the path he do nothing if i follow the Path with mouse.x and y he does. The next problem is, the pathfinder can go just right path but my game is with false path too. How can i solve that ?

  • Not sure I understand correctly, but have you tried a sprite instead of a button, and find the path to the x-y position of the sprite? You'll need the mouse plugin & check for on object clicked event of the mouse plugin to check for a click on the sprite.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you have 3 paths and you want only one path to be correct just block the other 2 paths on a player click.

    So let's say you have 3 sprites at the end of each path. Sprite1, sprite2 sprite3 and the correct path is the sprite1.

    On click on sprite 1 - > create 2 solid blocks to block the other 2 paths, wait 0.02 and find path to object sprite1.

    Same if click the other 2.

  • Uhm , i want that the 3 Ways are open but just one is the right way. The User should remind which one is the correct path on the start of the layout after few seconds the blocked part ist invisible and looks open. So he need to look at every path in the few seconds to know which one is correct. If he used the wrong way the PlayerSprite gonto the wrong path but the Game cant finish, if he use the correct way the PlayerSprite goes too the path and the Level is finish, go to next layout.

  • I think you will need 2 times 3 sprites.

    1 set of sprites where the user clicks. Only 1 of the 3 is the "valid one".

    Another invisible set of sprites is where the player will navigate to. One of the invisible sprites is on the same position of the visible, clickable, ones. That's the correct one. The other 2 invisible sprites are placed on the spot where the player is supposed to stop when he embarks on the wrong voyage. Only if the player arrives at the invisible sprite overlapping the correct, visible, sprite, you can go to the next level.

  • Try to use Long Path Tool

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)