Character moving left to right

Get help using Construct 2

Post » Tue Jul 05, 2016 11:47 pm

can someone please help me out here trying make character run left to right every tick
. Thanks

Image
B
14
S
7
G
3
Posts: 6
Reputation: 2,712

Post » Wed Jul 06, 2016 2:47 am

Is it just a constant back and forth motion? It may just be easier to use the Sine behavior to simulate this.
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Wed Jul 06, 2016 3:02 am

you mean you want your hero move left and right when you press a key? this is what i do when i want the player move left and right:
i add platform behavior to the player
event : touch - is touching for example left ( left here is the name of my left arrow ) →action : player : set animation to "running"
player : set mirrored
player : Simulate Platform pressing left

and the same thing to make your player move to right
B
22
S
9
Posts: 100
Reputation: 1,974

Post » Wed Jul 06, 2016 3:48 am

Sup with that? wrote:Is it just a constant back and forth motion? It may just be easier to use the Sine behavior to simulate this.



yes constant back an forth like every touch i want him to go left or right ... the way i have it right now it only goes to where ever i click
B
14
S
7
G
3
Posts: 6
Reputation: 2,712

Post » Wed Jul 06, 2016 6:21 am

Hmm, not sure I'm understanding this correctly. Are you trying to make it so the player never stops moving and keeps going left to right and back? How does the controls work?
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Wed Jul 06, 2016 6:29 am

Sup with that? wrote:Hmm, not sure I'm understanding this correctly. Are you trying to make it so the player never stops moving and keeps going left to right and back? How does the controls work?




like i want the player to move left or right when every i touch the screen ... so lets say hes going right an i touch the screen he needs to go back left like that... i been trying this for a weeks now still no good only go where ever i touch an stays
B
14
S
7
G
3
Posts: 6
Reputation: 2,712

Post » Wed Jul 06, 2016 7:21 am

The way it is on the screenshot should work as far as I can tell. Can you upload your .capx so I can test?
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Wed Jul 06, 2016 7:36 am

Sup with that? wrote:The way it is on the screenshot should work as far as I can tell. Can you upload your .capx so I can test?


https://drive.google.com/open?id=0B_0uNw5oNXJGcmJ4aUhpNktZemM
B
14
S
7
G
3
Posts: 6
Reputation: 2,712

Post » Wed Jul 06, 2016 7:57 am

lol darn, I only have version 227 of Construct so I can't open it :(

Does it still have the same problem if instead of 8-Direction movement you just put "Set Player.X to Player.X+1/-1" to make it move?
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Wed Jul 06, 2016 8:04 am

Sup with that? wrote:lol darn, I only have version 227 of Construct so I can't open it :(

Does it still have the same problem if instead of 8-Direction movement you just put "Set Player.X to Player.X+1/-1" to make it move?



Yah still does the same thing where ever I touch he just moves to that spot until I click somewhere else again
B
14
S
7
G
3
Posts: 6
Reputation: 2,712

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests