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!