How do I make sprite turn left/right in an 8 dir movement?

Get help using Construct 2

Post » Tue Sep 15, 2015 2:26 pm

After searching here and googling this and checking out many examples and reading explanations I still can't figure out how to do this in Construct.

I have an 8 dir animation for the sprite and want an 8 dir movement.

This is what I would wish for the sprite movement:
Every time I press the right arrow key the sprite turns right (in 45 degree intervals). Same with left arrow key - sprite turns left. Up-key gives speed and down key stops the sprite.

Any advice, links and suggestions much appreciated.
B
5
S
1
Posts: 12
Reputation: 403

Post » Tue Sep 15, 2015 3:38 pm

does it have to be using 8 direction behaviour ?

https://goo.gl/fvLbQS
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
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Sep 15, 2015 5:33 pm

No not at all as long as it corresponds to my 8 dir animations. IYSWIM :)

Couldn't open your file because it's saved with a newer version of Construct. I'm using the latest (I think) stable version 212.2. I don't want to use a beta version just now. :)
B
5
S
1
Posts: 12
Reputation: 403

Post » Tue Sep 15, 2015 5:34 pm

RamPackWobble wrote:does it have to be using 8 direction behaviour ?

https://goo.gl/fvLbQS


No not at all as long as it corresponds to my 8 dir animations. IYSWIM :)

Thank you for the example but I couldn't open your file because it's saved with a newer version of Construct. I'm using the latest (I think) stable version 212.2. I don't want to use a beta version just now. :)
B
5
S
1
Posts: 12
Reputation: 403

Post » Tue Sep 15, 2015 5:47 pm

How to open newer versions of capx files

unzip the capx and edit the caproj file in a text editor

find where is says (for example)

<saved-with-version>21100</saved-with-version>

and replace with an older number eg

<saved-with-version>17000</saved-with-version>

save and try

Search the forum for more information about opening newer versions in old versions.
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
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Sep 15, 2015 5:55 pm

Brilliant! Thank you!
B
5
S
1
Posts: 12
Reputation: 403

Post » Tue Sep 15, 2015 6:09 pm

Looks like it's exactly what I need. Thank you so much. <happy dance>
B
5
S
1
Posts: 12
Reputation: 403

Post » Wed Sep 16, 2015 1:30 pm

This movement is just what I am looking for.
But (isn't there always), when I try to add my sprite with directional animations the directions get scrambled. I have been at it all day trying loads of ways and examples but can't make it work.

The 8 directions using arrow keys, speed up and stop down, turning right/left and with animations ought to be a basic thing "out of the box" but I find it too complicated for my simple brain. And it seems I'm the only one needing this. :?

Any suggestions and push in the right direction much appreciated.
Was going to attach a file but apparently I have not posted enough yet.
B
5
S
1
Posts: 12
Reputation: 403

Post » Wed Sep 16, 2015 2:31 pm

are they animations or just frames (eg facing left , up, etc) ?
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
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Wed Sep 16, 2015 2:52 pm

Each of the 8 direction animations have 8 frames.
Am not sure I use the right expressions for C2, am used to other engines. sorry.
B
5
S
1
Posts: 12
Reputation: 403

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests