0 Favourites

How do I add a "press F to do function"

  • Hey there im currently working on a simplistic platformer and i have an issue where i want my player to climb a ladder.

    The idea i had is that the player goes up to the ladder and presses a key (presumably F) and it will play an animation of the character climbing the ladder and then the sprite will move to the top of the ladder once the animation is complete.

    The problem im having is i cant get it so this can only happen when the player is stood at the base of the ladder. ?

    Hope someone understands what i mean and can help.

  • 1.add to the player bullet behavior

    2.set bullet speed to 0

    3.add a new invisible object above the ladder

    4.add condition:on f pressed

    5.add sub-event to the above condition:is overlapping with the ladder object

    6.there will be multiple things that will happen when the sub-event is working: set platform speed to 0

    Set bullet angle to above

    Set bullet speed to whatever the speed you want

    7.add condition:on collision with the object above the ladder

    8.add events to the above condition: set platform speed to the default speed

    Set bullet angle to default

    Set bullet speed to 0

    Hope you find it useful and understand what I mean.

  • I am sorry I forgot to say about the animation

    Add an event to step 4:play the climbing animation

    And add to step 7:stop the climbing animation and play the default animation

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • If everything is working except that you only want the character to climb the ladder when they are at the base, just add an "is on floor" condition. That should fix you right up.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,152
karshinkoff's avatar
Unread hot topic
56 4,735
MPPlantOfficial's avatar
Unread hot topic
0 Favourites
Why is Stencyl doing better?
44 16,857
Potato's avatar