Platformer Player controls - How do I ?

0 favourites
  • 10 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hi. I am trying to "polish" and add different controls to my player. I did some staff from tutorials but I need help. I don't know nothing about programming so I try to keep my event sheet as understandable as I can.

    Here are some things that I've done but are not working properly:

    1. If I hold A or D and then begin LeftClicking, then release A or D and continue LeftClicking there is a pause and then begins the attack animations.

    I want the LeftClicking to immediately respond, after the player stopped, without having to change the 0.6 sec pause between animations.

    (Solved) 2. When I RightClick the player throws a rock and he is facing (mirroring) in the correct direction. The problem is that if, for example, I'm RightClicking somewhere on the right side of the player and then quickly press A (to go left), he is facing in that direction even If I set the platform disabled.

    How can I remediate this ?

    (Solved) 3. When I press "Q" the player will perform a powerful attack, the problem with this is same as point 2. So I don't want him to change the mirror state if I press A or D while the animation is playing.

    Also I thing that the particles that are spawned here are doubled somehow ... I don't know why.

    4. Another thing that is not working well is when he is falling a certain distance. Please, play and see what I'm talking about.

    Another thing that I want to implement to the player is to have the possibility to pull or push objects when A or D + CTRL is pressed.

    Edit: The objects have physics behavior

    I hope you understand what I am trying to say. Thanks in advance.

    Here is the Arcade link:

    https://www.scirra.com/arcade/action-ga ... sting-3115

    Here is my .caps file.

    https://www.dropbox.com/s/dlblzlsaupn56 ... .capx?dl=0

  • Can anyone help me with this please ?

  • Haven't seen the actual Capx (I don't have construct2 installed on this computer), but have you tried setting variables when keys are pressed and/or mouse is clicked? I.E moving left sets a variable, then if throwing right another variable is set, then if throwing right and facing left, the right animation is choosen.

  • Hi arcalaus, I never tried something like this - player controls with variables. Maybe if I see an exemple it will be easier for me to implement it. I will try what you suggest ... and maybe you will look on the caps file and see what I've done wrong. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe this example will get you on your way:

  • I don't understand ... is there other simple method ... closer to what I have now in my event sheet ?

  • I don't understand ... is there other simple method ... closer to what I have now in my event sheet ?

    The example sets a variable based on the keyboard input..

    The dictionary object is just used to turn that variable into a word..

    You could use the variable to attach the actions/animations..

    It was just meant as an example on creating your actions based on a state instead of the direct input..

  • Ok, I think I understand what you say but I don't have the necessary knowledge to implement this ... finally I managed to solve this, I came with the idea of making 2 groups for "when A is down" and "when D is down". I set the 2 groups deactivated at the start of the animation and activated at the end of it so that the mirror state is not triggered. Point 2 and 3 solved. Thanks everyone for helping me.

  • Hi. I did some more to my project (see the arcade link on top of the post). I think I will use a lot the physics behavior, but the player uses just the solid behavior ... and some things just don't work well. Do I have to add the physics behavior to the player too?

    Any of you tried to do something similar ?

  • Hi again, I want to do something like this:

    Every time is subtracted from PlayerHealth(global variable) - Show the redscreen

    I want to do this so I don't have to add manually for every enemy or prop that hits the player to show the redscreen

    How can I do this ?

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