How do I Compare X or Y Speed?

Get help using Construct 2

Post » Mon Oct 19, 2015 3:57 pm

Hi!
Was wondering if there is a way to compare the X or Y speed so when (example) the character is moving down, that the character is facing that way. I am working with touch controls and is having a rough time figuring it out. I know that there is an action where you compare the y co-ordinate but isn't one for speed. I use Rex's Plugin "MoveTo" behaviour for the touch input if that helps.
B
7
S
2
Posts: 12
Reputation: 509

Post » Mon Oct 19, 2015 5:53 pm

Have a look at the behaviours "Compare moving angle" ?

Image
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Mon Oct 19, 2015 6:37 pm

Will check it out when I get home but looks like what I need! :)
B
7
S
2
Posts: 12
Reputation: 509

Post » Tue Oct 20, 2015 8:11 am

I should have said

Method 1 will turn ship 90 degrees (n,e,s,w)

method 2 will point ship in direction travelled

only use one of the methods :)

also I was using mouse so just replace mouse with touch.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Tue Oct 20, 2015 8:46 am

I tweaked the first method so it works with the animations but they don't change while I am touching the screen. When I initate they change but if I change angle it stays in the same animation frame as before. I have four animation frames at the moment which is a 2d character facing north,east,south,west so it is not about rotating it but changing the frame at the desired direction he is moving (just to clarify).
B
7
S
2
Posts: 12
Reputation: 509

Post » Wed Oct 21, 2015 7:47 am

yep, look at where I am setting angle and add the correct frame animation there
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832


Return to How do I....?

Who is online

Users browsing this forum: Fenix18 and 9 guests