Platformer Player controls - How do I ?

Get help using Construct 2

Post » Fri Nov 06, 2015 11:01 pm

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
Last edited by anty21ro on Thu Nov 19, 2015 9:43 pm, edited 3 times in total.
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Sun Nov 08, 2015 9:25 am

Can anyone help me with this please ?
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Sun Nov 08, 2015 2:02 pm

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.
B
43
S
14
G
6
Posts: 132
Reputation: 9,115

Post » Sun Nov 08, 2015 4:17 pm

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.
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Sun Nov 08, 2015 4:29 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 08, 2015 4:50 pm

I don't understand :( ... is there other simple method ... closer to what I have now in my event sheet ?
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Sun Nov 08, 2015 5:01 pm

anty21ro wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 09, 2015 5:12 pm

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.
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Sun Nov 15, 2015 9:21 pm

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 ?
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Thu Nov 19, 2015 10:20 am

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 ?
B
35
S
9
G
9
Posts: 207
Reputation: 6,805


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Donald Cela, Hadyurik, Yahoo [Bot] and 8 guests