Hi everyone,
I am learning some of that C++ for quite some time mainly with UE4. So yea...another one like me :D. I wanted to ask what is the easiest way to do toggling between multiple states. Let's say I want to by pressing E turn something on and it takes 5 seconds to be turned on. So if i press E again in five seconds I would pause the process and by pushing E again I would cancel it, then E again pause and so on and on. There is very handy blueprint in ue4 called multigate which is perfect for this, but I really want to do it in c++. I have an idea with a few variables but I feel like it is too complicated and so far I ve found much simpler solution on internet for everything I have done on my own. If you have any ideas I will be thankful. Thank you!