Left & Right Click

Get help using Construct 2

Post » Thu Jul 26, 2012 4:33 am

I'm trying to assing different actions for left and right click , at the moment the left click simulates movement and returns to idle when stopped or hits something.

I want my Right click to simulate running (left simulates walking). Using the same method i want the right click function to set animation to "sprint"

heres the capx

Download Here
B
4
Posts: 33
Reputation: 391

Post » Thu Jul 26, 2012 11:25 am

Anyone ? please... i can't get the two working together
B
4
Posts: 33
Reputation: 391

Post » Thu Jul 26, 2012 1:32 pm

I can't open your file since you're using a plugin I don't have.

But what if you make a variable "movement" that you set to 0 when the character is supposed to be idle, 1 when he's should walk, and 2 when he should run. Have these as the conditions for your move events instead of the button clicks.

Then when you click the left button, you set the variable to 1, right click sets it to 2, and so on..
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 1:42 pm

Try redownloading the file , the plugin i had was Touch2 as i want to allow Mouse clicks and touch control , not sure how to allow for running on touch tho, i was thinking with the touch2 plugin i can check if two touch points are active for running..

Download Capxlodose2012-07-26 13:47:54
B
4
Posts: 33
Reputation: 391

Post » Thu Jul 26, 2012 2:02 pm

How to do what I said above:

lodoseGame.capx (r99)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 2:14 pm

Cheers for that mate ... how comes the animations don't loop using this method ? i just set the frames and check all animations to be set on loop but they're not when testing?
B
4
Posts: 33
Reputation: 391

Post » Thu Jul 26, 2012 2:23 pm

Looks like you've messed with the "repeat count" and "repeat to", set them to the same as the other animation.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 2:25 pm

I've set all them correct now but its still not looping ?

idle = 0 , 4
walk = 0 , 6
run = 0 , 6

all on loop too lodose2012-07-26 14:25:53
B
4
Posts: 33
Reputation: 391

Post » Thu Jul 26, 2012 2:26 pm

Working fine here, re-upload your capx?

Nono, it should be 1, 0 on every single one.

Edit: Or, well, the first one doesn't matter, but the second one must be 0 if you want it to loop correctly.Nimtrix2012-07-26 14:27:56
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 2:30 pm

Download Capx


omg im such a noob lmao , your right im so sorry repeat 1 start on frame 0 when end :)

i get it now , its my head, its filling up with junk .. think im gunna stick to just getting this right for now instead of implementing Mob AI n suchlodose2012-07-26 14:33:52
B
4
Posts: 33
Reputation: 391

Next

Return to How do I....?

Who is online

Users browsing this forum: Nifl and 23 guests