Animation Triggers For 8 Direction Movement?

0 favourites
From the Asset Store
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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?

  • 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

  • If that does not suit, maybe experiment with "move at angle"

  • Edit key is down condition, as key pressed will only move it once...Oops!

  • pixel perfick

    What about the actual jump command?

    I have never been able to set up a smooth jump using these movements.

    You way of explaining the variables and animations helped me alot and im now using your method,But what about the jump.This is the part of custom movements i dont understand,it also is hard to implement jump with 8 direction movements.Whats the best way to make a jump feature for a game like Streets Of Rage.

  • 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 ....

  • lennaert pixel perfick thank you guys for help,it means alot.Im sure there are people that will hit the same walls im hitting so your help is always a great thing.

    One thing i would love to know how to do is implement JUMP in this 8 direction behaviour.Do you know how to make this happen?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lennaert Pixel perfick thank you guys for help,it means alot.Im sure there are people that will hit the same walls im hitting so your help is always a great thing.

    One thing i would love to know how to do is implement JUMP in this 8 direction behaviour.Do you know how to make this happen?

    Sure, in my example, below the every tick, you could add any type of condition with a variable or on key press ... or, use your imagination.

    examples:

    A variable indicating speed could determine, if the "walk" animations should be done, or "run" if a certain speed is set.

    Pressing a certain key could indicate that the walk animation should not be used, but another, jump for instance.

    Another approach,is simply have 8 animations named animation0 to animation7. (instead of walk0 to walk7)

    And use

    jump up    - animation0

    jump right - animation1

    walk right - animation2

    right down - animation3

    duck       - animation4

    left down - animation5

    walk left - animation6

    jump left - animation7

    For jump ofc, you would need to implement some mchanic to get a jump going.

  • lennaert I actually mean how to get the jump started in a 8 direction or custom movement.

    I do not know how to make a smooth jump,I only have one jump frame so its not that complicated.I really just dont know how to make my character jump.Its kinda given to us in the Platformer Behaviour.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)