Heartbeat beats per minute

I am creating a mechanic that plays the player characters heartbeat.

This poses a few problems. How can I create beats per minute in UE4? I was thinking about using the ‘get real time seconds’ in some way but all of my searching and playing around with it doesn’t seem to help.

I think once I figure that out I’ll be able to adjust it depending on what he’s doing, but I really can’t devise a way to make unreal do something say 80 times per minute.

Hi there,

You could also use the “Set Timer” blueprint function, which is very usefull if you want to loop your beat, or also clean the timer. Here is the documentation about it :
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html

Also, you can call a specified function each time the timer is called, which I really often use.

This is really interesting, do you think you could go into slightly more detail as to how I might do this?

The reason why I ask, is that If I actually do this, and play sound attached it comes out very weird. But I feel like this is really close.

I read the documentation and I too thought that I timer could be used. But I just don’t see how to make it work right. I want to have a variable for the bpm and have a heart beat sound depending on that variable…but I’m just not sure how to use timers in this instance to accomplish it.

You could use this setup to manage delay.

http://puu.sh/jFhSc.png

My idea:

First you need to get Delay duration

80 ticks per minute = 60 sec / 80 tick = 0,75 sec

0,75 is delay which you can set to delay in Tick function.

Sure its not probably best solution but it will work.