Hi, how to change game music if enemy see player and back again?
Hello,
There are a number of ways you could do this and this was the first that came to mind.
Have a Bool that determines when your player is spotted (in my example I just hooked it up to S for testing). Hook a Branch that checks that Bool up to an event Event Tick.
When the Bool is True, it executes a DoOnce node so it stops the current music (whatever your default music is) and immediately starts the new music (battle music). I do this since I want it immediately to kick in (you can use a FadeIn node if you wish).
When the Bool is False, it executes a DoOnce node and fades out the new music (battle music) before fading in the default music.
Hook the last node up in each sequence to reset the DoOnce nodes as shown.
Hope this helps,
-W
Hi, thanks for answer.
Can you show an example ShooterGame?
And how to set radius where bot see player?
For this, I’d take a look at the Blueprint Office map. Take a look at the security camera Blueprint, it has logic for panning/scanning (which could be applied to a bot) and detecting a player within a radius (you’d just need to hook that up to a character in your level).