x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to implement heartbeat game?

Hello again, just wanna ask how do you implement a game that you need to press button on a correct timing in which the visual and sound change on every correct input.

For example, player needs to reduce insanity so he needs to do the heartbeat game to reduce it. When event started, player need to press the correct input of button which have 3 stages. Visual and sound will be blurry and heartbeat sound is the fastest. As player click the correct button the visual and sound which were loud earlier became more clearer and no sound of heartbeat played anymore.

Thank you

Product Version: UE 4.19
Tags:
more ▼

asked Jul 04 '18 at 09:09 PM in Blueprint Scripting

avatar image

Vu5e
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Try to use timers

https://docs.unrealengine.com/en-us/Gameplay/HowTo/UseTimers/Blueprints https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Timers

On first click start te timer and mark somewhere that it is active, and when timer pass make a miss code, on any other click check if timer past if not it's OK reset timer if yes then nope (timer pass code should stop the check anyway). You can also use timer little diffrently like make longer time then target time and check timer status on click and make difference to target time, this way you can do some tollerance window if you want.

Remember that CPU don't have sense of time and that timer code is executed in loop with other programs running by OS and it takes time for timers to be checked again, timers are checked on every frame (if im not mistaken) so if you have run 60FPS you got around 16ms accuracy

more ▼

answered Jul 05 '18 at 01:49 AM

avatar image

Shadowriver
36.7k 932 169 1111

avatar image Vu5e Jul 05 '18 at 06:00 AM

Can you show it to me in blueprint because my english is not that good.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question