User Tag List

Results 1 to 5 of 5

Thread: Help with an animation for shooting while walking?

  1. #1
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with an animation for shooting while walking?

    Hi. Having a little problem and hoping for some ideas on how to solve it.

    Remember Megaman on the NES? When you fired your weapons while running Megaman would briefly raise his arm cannon without interrupting his running animation or needing to stop. How can I program something similar?

    I've already got a four frame animation for running with my hero swinging his arms. And I've made a very similar four frame animation for firing a weapon while running, where one arm is raised to attack while the other still swings. I just don't know how to cut smoothly from one to the other and back.

    I've tried things like "If button two is pressed, then change animation sequence," and then making normal animations all dependent on button 2 NOT being pressed, but this doesn't preserved the frame value so the animation starts over and looks jerky.

    I've also tried creating an alterable value to record the old frame value and restore it to the newly activated animation. This DOES preserved the correct frame--whichever frame I hit button two on is the frame that loads in the firing animation--but then the animation stops and just stays on that one frame as I glide across the floor.

    I'm a little bit confused about what to try next, so any ideas or perspective you could offer would be greatly appreciated!

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2008
    Location
    The U of K.
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with an animation for shooting while walking?

    Make your hero of two parts.

  3. #3
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with an animation for shooting while walking?

    Nah dude, just use extra directions in your walking animation. For example:
    Make directions 0 and 16 a normal walking animation, and direction 1 and 17 a walking while shooting animation.

    Then make a value (lets call it "Dir") for which direction your player is facing, and a value (lets call it "Shoot") for when your player is shooting.

    Then use these events:

    -Player is walking
    User presses fire button: Set Shoot to 1

    -Player is not walking: Set Shoot to 0

    -User presses right: Set Dir to 1
    -User presses left: Set Dir to 2

    -Dir is 1
    Shoot is 0: Set player direction to 0

    -Dir is 2
    Shoot is 0: Set player direction to 16

    -Dir is 1
    Shoot is 1: Set player direction to 1

    -Dir is 2
    Shoot is 1: Set player direction to 17

    This way, you only use 1 animation for "walking" and "walking while shooting", your only changing the direction which means the frames will stay in sync. Just make sure all directions in the walking animation have the same number of frames.


  4. #4
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with an animation for shooting while walking?

    Brilliant! I've now set my "fire while walking" frames to empty directions within my normal walking animation and everything animates smoothly! Thanks!

    The only quirk I noticed is that when I continue to hold down the fire button, the player's arm remains extended indefinitely even tho only one projectile has been fired. I can work with this too, but anything thoughts on how to tell to only momentarily raise his arm during attacks--even if I don't let go of the button right away?

  5. #5
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with an animation for shooting while walking?

    Well you could use the timer, that would be the quickest way but the time may not always be correct.

    -Every 1 second
    Shoot is 1: Set Shoot to 0

    I'd rather make another value or counter (let's call it "ShootTimer") and use this:

    IF: Shoot is 1
    THEN: Add 1 to ShootTimer

    IF: ShootTimer is greater or equal to 100
    THEN: Set Shoot to 0
    Set ShootTimer to 0

    You might also want to set ShootTimer to 0 if the player is getting hurt or doing anything else that can interrupt the walking and get the ShootTimer stuck on a number >0<100.

    For stuff like this just try to think of how to code it as logically as possible. You wanted your players arm to go down after holding it up for a second or so, right? Well thats literally all you have to code: Every second or so that the players arm is up, set it down. Easy as that :P

Similar Threads

  1. replace walking animation
    By jaaj302005 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th November 2011, 03:02 PM
  2. Odd walking animation issue
    By Thrawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st February 2011, 02:35 PM
  3. Animation doesn't work while walking
    By Tolkkiz in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 10th December 2009, 05:11 AM
  4. Walking Animation + collision problems. please :)
    By Downup2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 27th May 2009, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •