Lala Lala's Forum Posts

  • 2 posts
  • Thank you for your explanation and example of a state machine, it was very helpful and sent my mind in the right direction.

    It all seems to be working correctly now.

    I did something like this:

    player_state = 0 setmaxspeed to 80

    player_state = 1 setmaxspeed to 300, wait 0.2, set player_state to 0

    and so on, and it seems to work as far as i can tell.

    cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone,

    I'm trying to make a combat/movement system similar to that of Hyper light drifter or Hob and having a hard time figuring stuff out. I'd be very grateful to receive help or tips on how to think about this, since i'm very new to this and also not very logically minded

    What i'm trying to figure out is the movement of it all.

    Apart from running around (which i use the 8direction for), i want the player to be able to:

    Dodge - a quick forward motion in the current direction

    Attack - stopping player movement while attack is active

    Defend - decreasing movement speed when holding LT

    Dodge - i've done this one by using a boolean and increasing player max speed for a certain amount of time with "wait" and then setting it back to my default value. and this seems to work alright. this is on button pressed

    Attack - the player should stop and take a swing when attacking, and i used the same method as the dash but decreasing max speed instead. this also seems to work.

    The problems start with the defending.

    this one should be active only when the player holds the left shoulder trigger.

    I use a boolean and decrease the max speed when the player holds LT and then sets it to 80 (which is my default speed) if not. This value seems to override all the other events though, since they no longer work.

    I can't wrap my head around this and any suggestion would be highly appreciated!

  • 2 posts