User Tag List

Results 1 to 2 of 2

Thread: How do I combine states?

  1. #1
    No Products Registered

    Join Date
    Jun 2020
    Posts
    9
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How do I combine states?

    Fiddling about with a clone of the arcade game Kung Fu Master. I nailed standing kick and punch with collision box. My problem is when I combine states.
    I have Alterable variables to check what state the player is in: Face left, face right, stand punch, stand kick, jump, crouch and crouch kick so far.

    Now, I can't figure out how to enable the crouch kick state while in the crouch state, any tips?

    Setup for crouch is like this:
    Events -
    Repeat while joystick is held down
    PMO - Object is standing on ground
    stand punch = 0
    stand kick = 0
    crouch kick = 0

    Code -
    Change speed of animation: 15
    Change animation sequence to crouch down

    Event 2 -
    animation crouch down is playing

    code-
    set crouch to 1

    Event 3 -
    animation crouch down has finished playing

    code-
    set crouch to 0



    Setup for crouch kick is like this:
    Events -
    Pressed fire 2
    Repeat while joystick is held down
    PMO - Object is standing on ground
    stand punch = 0
    stand kick = 0
    crouch kick = 0
    only one action per loop

    Code-
    Change speed of animation to 15
    Change animation sequence to crouch kick

    Event 2-
    animation crouch kick is playing
    only one action when event loops

    code-
    create hitbox at location x,y
    set crouch kick to 1

    Event3-
    Animation crouch kick has finished

    code-
    Set crouch kick to 0
    destroy hitbox

  2. #2
    No Products Registered

    Join Date
    Jun 2020
    Posts
    9
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Or, to make it more simple:

    If alterable value crouch = 1 and joystick fire 2 is pressed then alterable value crouch kick = 1 and alterable value crouch = 0.
    The issue I have with this state setup is that when the state crouch kick = 1 I can't get out of the crouch kick animation, I tried setting a condition to check whether the crouch kick animation has ended, but I guess that due to the nature of states the crouch kick animation plays infinitely, what would you do in order to be able to stand, crouch and crouch kick?

Similar Threads

  1. Replies: 3
    Last Post: 11th December 2018, 10:17 AM
  2. [Help Needed] Movement and (Character) States
    By Burian in forum Fusion 2.5
    Replies: 4
    Last Post: 24th September 2018, 10:00 PM
  3. Detecting down and up states of all keys.
    By BartekB in forum Fusion 2.5
    Replies: 4
    Last Post: 27th August 2016, 10:57 PM
  4. Replies: 6
    Last Post: 26th May 2015, 03:44 PM
  5. Saving states when switching between frames
    By Maggott in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 26th September 2008, 12:18 AM

Posting Permissions

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