User Tag List

Results 1 to 5 of 5

Thread: [Help Needed] Movement and (Character) States

  1. #1
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help Needed] Movement and (Character) States

    Hello Community!

    Today I wanted to learn about states. To do this, I made a dummy character and defined 4 states as alterable values:
    1) Moving (built in 8 directional movement)
    2) Climbing Stairs Movement (built in 8 directional movement, but slower speed)
    3) Dashing (not built in yet)
    4) Blocking (While B is pressed, character gets a static movement and switches back to movement 1, when B is not pressed anymore)

    So far I am quite happy with what I got, but there is an issue:
    When I start the frame, enter the staircase, block and stop blocking again, the character is still on the stairs, but he moves normally instead of staircase movement.
    My counters indicate the correct state, but the movement does not reflect that.
    I suppose it has something to do with my limiting conditions, but I can't figure it out.

    I would appreciate it a lot, if one of you guys could take a look at my .mfa and tell me where exactly I messed up.

    Thanks in advance!
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,135
    Mentioned
    197 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what you're asking but I had a look at your mfa and:

    Nothing worked until I entered in some speeds / directions and then everything seemed to work as you wanted it.

    You would have to take out the limiting condition "only 1 action when event loops" and you really don't need it here.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Janette5 and thanks for getting back at me!

    Sorry for being unclear on what I was trying to do.

    I have changed the scene, to give a better visual representation.

    Imagine a Zelda-like top down game. You control the Character with the arrow keys.


    The character will have two abilities:
    - Dashing (not implemented in the test scene)
    - Blocking (By pressing and holding ďBĒ button, a shield will be placed in front of the character, but he wonít be able to move anymore)

    There is a staircase in the scene. I want to create the illusion that the character slows down while going upstairs.

    To manage the different movements / player abilities, I implemented 4 alterable values to switch around. (thatís why I have the letters on top of the screen, to be able to see which states are active).
    I have created different movements in the player object. Depending on which state is active, the corresponding movement should be activated as well.

    I am happy with the functionality so far.


    Here is my problem though, here are the steps to reproduce it:

    1) Navigate the character on the stairs. (Donít leave the stairs. You will notice the movement is slowed down - itís intended and works)

    2) Press B to block. The shield will appear. Release B and the shield will vanish. (As long as B is pressed, the character will not move - itís intended and works)

    3) After releasing B, the current state indicated by the numbers above is ďStairsĒ which is fine. But now when you move the character, he moves faster than he should (although he should move slower, as long as heís on the stairs)



    I have also tested the modified .mfa file you provided me with, but so far it does not work for me, unfortunately.

    I hope I could give a clearer picture of what Iím trying to achieve.

    Thanks,

    Burian
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,135
    Mentioned
    197 Post(s)
    Tagged
    0 Thread(s)
    Okay, I understand what you're saying.

    The way you're doing things is very confusing to Fusion, for example:

    Your line 7 and your line 13 will both run because they're both true at the same time.

    So line 7 runs. Line 13 Stops it. Then line 18 undoes what line 13 did, which will cause line 7 to run again which will then be stopped by 13 etc.

    So when you don't have the limiting condition in Fusion actually freezes and your player doesn't move because all your codes are working against each other.

    You can try to activate and deactivate groups so that they don't work against each other i.e. if the player presses B activate the blocking group, when he stops then deactivate it.

    Or you can create more scenarios - if player is on the stairs and being blocked / the player is not on the stairs and being blocked etc.

    Let me know if you'd like an example.

  5. #5
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your reply! Okay, I understand what you are saying. I'll try your tip with activating / deactivating groups.
    Thank you!

Similar Threads

  1. Detecting down and up states of all keys.
    By BartekB in forum Fusion 2.5
    Replies: 4
    Last Post: 27th August 2016, 11:57 PM
  2. Replies: 6
    Last Post: 26th May 2015, 04:44 PM
  3. Character creation help needed.
    By Jay226 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th December 2011, 04:46 PM
  4. Needed Movement List
    By Kisguri in forum Extension Developers Lobby
    Replies: 5
    Last Post: 28th August 2009, 03:34 PM
  5. Saving states when switching between frames
    By Maggott in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 26th September 2008, 01: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
  •