Animation Triggers For 8 Direction Movement?

Discussion and feedback on Construct 2

Post » Wed Jan 22, 2014 9:32 am

@Ashley is it possible to make triggers for the other movement behaviours we have?
Its not as smooth to set up as the platformer.
Its a time saver to use triggers.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jan 22, 2014 11:35 pm

What exactly would you use the triggers for? Most of the time triggers on the platformer behavior get used for changing the animation and other events that need to trigger when the player lands or jumps. Since you don't move around and get pushed defaultly in 8dir, other than that I am unsure what you need

---

For 8dir depending on what you want to do, you can do it based on it's VectorX and VectorY values if it's something triggered on movement directions

This way you can change the animation when the values meet a certain requirements on the vector itself. This way you can do diagonal movement just by comparing the difference in vector totals.

If the 8Dir rotates, you wouldn't really need to change the animation based on what direction it's going so you would have to change the animation based on whatever angle the playerbox is at and then change the animation based on that.
Thndr2014-01-22 23:38:37
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Thu Jan 23, 2014 11:29 am

@Thndr what about games like Streets Of Rage,Where the player moves similar to platformers but its all an a illusion,its really just 8 direction movement with some clever tricks to depict animations.
I would love to know a basic technique for making triggers i understand the vectors but there has to be another way aswell.With me being use to platformers,im kinda lost with 8 direction,i understand alittle bit of it but im tryin to grasp it fully.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jan 23, 2014 11:55 am

Setting up platformer animations with events can be pretty tricky, so the animation triggers are there to make it easier. 8 direction is really simple though, there's really not much to it other than moving or not moving, so it should be easy enough with events.
Scirra Founder
B
399
S
236
G
89
Posts: 24,541
Reputation: 195,426

Post » Thu Jan 23, 2014 12:33 pm

@Ashley The part i cant understand well is the Jumping aspect of the 8 direction movement,I can never get it as smooth as the platformer jumping.
I seen a few different ways to make a jump with a shadow sprite under your main character but is this the only way to make it happen?
I will look for a decent example,but ones showcasing animations are not easy to find with the 8 direction movement,Its usually top downs that get made with it.I think it can serve the purpose of Isometric pretty well.I still would love to get a few pointers from the community.Thanks for your reply @Ashley it means alot to us seeing you guys active.Thanks for everything.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jan 23, 2014 12:50 pm

You would probably find it easier setting up custom movement rather than fight the inbuilt 8 direction behavior.. just adding x*dt to your axis then set your animations from variables.
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 » Thu Jan 23, 2014 1:00 pm

@Pixel perfick What you just said i can understand somewhat,What does the custom movement offer over the built in 8 direction?
Also you kinda lost me with x*dt and setting my animations as variables?This is the first time ive heard this way of making a character move.
Is there any examples of animation frame changing using this method?RookieDev2014-01-23 13:00:41
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jan 23, 2014 1:10 pm

What it offers is 100% control of your movement without the set behavior interfering

give a default sprite an instance variable say speed,set it at 100 for now, create event on left arrow pressed

set sprite x to sprite x-sprite variable <speed>*dt this will move it left

create event on right arrow pressed

set sprite x to sprite x+sprite variable <speed>*dt this will move it right...

same applies to Y for up down...or both for diagonal...alter the variable to change speed
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 » Thu Jan 23, 2014 1:15 pm

If that does not suit, maybe experiment with "move at angle"
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 » Thu Jan 23, 2014 1:18 pm

Edit key is down condition, as key pressed will only move it once...Oops!
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests