Why is my timer not firing every .5 Second?
My blueprint for continuous damage for every half second that my character stands on spikes is not functioning correctly. I only take damage when I initially stand on the spikes and unreal never calls for a second check on whether I should take damage or not. Do I have the right idea here? How can I fix this?
I originally a function plugged in the settimer node for a value of .5, but it didn't seem to be adding anything so I deleted it.
Thanks a ton guys.
asked Jul 13 '15 at 05:48 AM in Blueprint Scripting
You should read up on how to use timers. What you did is starting a timer named "" (thats an empty string) and then continued with reducing the health by 0.5 and then the event is finished. Timer is an asynchronous task and does not work like Loop (think about it, it makes sense).
What you should do: Create a function, which deals damage and name it, eg "ApplyDamage" put the name (ApplyDamage) into the function name of Set Timer.
From then on, ApplyDamage is called every 0.5 To end the timer, you call "Set Timer" with loop=false (but this actually calls the timer once more) or you cancel it with "Clear Timer".
answered Jul 14 '15 at 08:57 AM
I ended up taking out the timer entirely as I couldn't get it to work while looping back to the start of my damage system with a variable of is Elisa overlaping with spikes and setting up a branch. If the variable of spike overlap is true then run the damage system again. If false do nothing, not what I was trying to do but it works like a charm.
Follow this question
Once you sign in you will be able to subscribe for any updates here