User Tag List

Results 1 to 7 of 7

Thread: Stop and negate movement with melee attacks.

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stop and negate movement with melee attacks.

    I made an animation for my character when it makes a melee attack, and the idea is that while the animation is playing it shouldn't be able to try to move at all, and if it's already moving it should stop too, but I've tried to make this happen and it just doesn't work, if the player is moving already when it starts to attack it'll continue to move like nothing is telling it to stop, and setting speed doesn't work either, or maybe I'm doing it wrong.

    Thanks

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Zebedy's Avatar
    Join Date
    Jul 2016
    Location
    UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which movement are you using for your character?

    Theres various ways you can get him to stop; simplest way would probably be :

    -Animation melee is playing
    +set speed to 0

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My character is using eight direction movement.

    That's just what I did, but the player only stops for less than a second and then continues to move if I'm holding any movement key.

    The idea is that the player can't move anywhere if attacking, and if the player stops attacking it should me able to move again, but I just can't figure out how to do it.

  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I changed it so that it doesn't change the speed but rather maximum speed, and it stops the player from moving for a little longer than changing speed, so I might be in the right track.

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I made it so that when the player attacks a value is set to 1, which makes the character unable to move, and at the same time a timed event that reverts the value back to 0 so the player can move again.

    And it works!!... Only the few first times you attack, apparently when there's too many clicks the timer cancels itself and just launches the event inmedately, making it so that instead of completely stopping when it's already moving like at the start before clicking a lot, it just stops momentarily (less than a second) and then inmediately moves again.

    I'm completely stuck...

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Zebedy's Avatar
    Join Date
    Jul 2016
    Location
    UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, you're along the right lines, I would have done something like that as well. Some of the movements like to cause trouble.

    Yeah about the clicks, its a bit annoying, but you can remedy it with another timed event or alterable value.

    For example you could have it so the event only triggers if the alterable value "Mouse Left" is less than 5.

    (For the timed event)
    +User is pressing left mouse button
    + "Mouse left" is less than 10

    =Add 1 to "Mouse left".

    then, when you release the button

    +(Negate) User is pressing left mouse button
    +"Mouse Left" is greater than 0

    =Sub 1 from "Mouse Left"

    So then, you could add this condition to your existing event for your melee attack

    -"Mouse left" is less than 5


    Which should stop the timer cancelling itself.
    In my head that sounds like it'll work, but if it doesn't, feel free to send it my way; I'll have a look for you

  7. #7
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried to do what you said, but it's impossible to negate click events.

    I tried something else, and it actually works flawlessly!

    What I did was:


    "User clicks" "change animation sequence to attack"
    +"cooldown is lower or equal than 30" "set cooldown to 0"

    "Cooldown is lower than 30" "add 1 to cooldown"

    "Cooldown is lower than 30" "set maximum speed to 0"

    "Cooldown is equal to 30" "set maximum speed to 10"


    the cooldown value is in the player character and all of the changes (animation, value and speed) are made to it.

    I'll leave this here in case anyone else wants to do the same thing

Similar Threads

  1. Replies: 0
    Last Post: 20th April 2019, 03:25 PM
  2. Won't stop the path movement
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th April 2013, 11:52 AM
  3. Melee Attacks
    By Carbon_KO in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 12th February 2013, 08:13 PM
  4. Movement Stop Greyed out
    By Renatos in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th August 2006, 08:11 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
  •