Can someone look at my blueprint layout and tell me what I’m doing wrong here? I want my main character to dash, be invisible for the split-second duration of the dash, then unhide itself at the end of the dash.
The issue is, I can’t figure out how to “unhide” them and sync that to the dash so the player can’t spam hide/unhide in between dash cooldowns. In blueprints, I’m able to bind “release [the dash key]” and “unhide,” but then there’s the issue of players being able to spam hide/unhide even when they’re unable to dash b/c of the cooldown. No clue how to disable the hide/unhide action for the duration of said cooldown.
create 2 events, start dash which only works if not already dashing and end dash which only works if it is dashing. call start dash on pressed and end dash on released and/or after the dash is complete.
to unhide just set hidden in game to false in your enddash
probably no need for the ishidden bools either since you always want it hidden on dash and unhidden after assuming nothing else modifiers the value
I create a 0.1-second Delay for the hide-unhide action, then subtract those 0.1 seconds from the overall cooldown (the second Delay). I store the cooldown (default 1 second) in an exposed float variable and the bool for CanDash in another, and aside from that, no other variables are needed.