Animation Triggers For 8 Direction Movement?

Discussion and feedback on Construct 2

Post » Sun Jan 26, 2014 8:54 pm

@Pixel perfick @lennaert there will be platforming availible to the player.
Thats why i need to know.I actually want him to jump.
He will be walking down a wide street and cars will be on the sides of the road for the player to jump onto.
Ive seen no games on C2 with this effect.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Jan 26, 2014 10:37 pm

@rookiedev it should still work, ensure you set your collision box above your characters feet and as lennaert said add a few extra frames to smooth it up...I will have a go at a capx tomorrow if you get no joy with it...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Mon Jan 27, 2014 5:08 am

@Pixel perfick I would love to see a visual representation of what you are talking about regarding the origins of the animations to make something similar to a jump.
If you do create something do you mind if i would place it inside the capX tutorial section?
I would really love to learn how to do this the right way,Ive been able to make everything else work correct but this.Thanks Pixel perfick
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jan 30, 2014 6:48 pm

@Pixel perfick do you mind showing me how this works?
I have been trying for a few days to get it correct and im getting nowhere fast.Thank you for your previous replies.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jan 30, 2014 7:41 pm

Hi, sorry not been about, hope this explains better than written description...

https://dl.dropboxusercontent.com/u/146573792/originjump.capx

I used 8 direction for speed, take note of the origin points in the animation frames, with refinement it may do what you need...Pixel perfick2014-01-30 19:49:27
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Fri Jan 31, 2014 10:03 pm

@Pixel perfick thank you for showing me this capX file,I really am lost when it comes to this type of movement.I will be away for a few days because im moving,but i wanted to know, if i come across an issue with this file do you mind if i ask you for help?

Thank you once again Pixel perfick! i owe you one
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sat Feb 01, 2014 6:23 pm

Yeah sure, no problem...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Sun Mar 09, 2014 9:58 pm

lennaert wrote:Add 8 animations to Sprite which also has 8 dir motion

walk0
walk1
walk2
walk3
walk4
walk5
walk6
walk7

These should each have the frames for the directional movement.


Then: (simplistic approach)

every tick

sprite set animation:

"walk"&ceil(8*(1+Sprite.8Direction.MovingAngle/360)-0.5)%8

play from current frame

Voila ....


This is such a simple way of doing 8 way animations. Though I am having an issue with figuring out which of the walk0 - walk7 handles what direction animation.

Is there an order of the directions.. Like walk0 = up, walk1 = down ?

I assumed that from 0 - 7 it would be:
0 = up
1 = up-right
2 = right
3 = down-right
4 = down
5 = down-left
6 = left
7 = up-left

But when I implement it it seems almost backwards or off.
Image Image Image
B
63
S
19
G
6
Posts: 325
Reputation: 7,994

Post » Sun Mar 09, 2014 11:09 pm

Never mind, I figured it out.

0 is right and it goes clockwise after that.
Image Image Image
B
63
S
19
G
6
Posts: 325
Reputation: 7,994

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests