After playing a lot of Fallout and Metro, I’ve started thinking about radiation mechanics and how geiger counters could be programmed. From this reddit thread I’ve been able to get a decent idea of how geiger counter audio works, but now I’m thinking of how radiation could be made, perhaps more “generic”. For example, in Fallout, radiation heals ghouls while damaging normal humans. So radiation detection on these would work differently, likewise with the geiger counter, which ticks with radiation exposure. I’ve set up a sphere volume that emits some “radiation per second” as a number, and it’s easy enough to start the geiger counter ticking sound when in this volume, but I can’t help but think I’m going about this the wrong way. Any advice anyone can offer on this would be appreciated.
I’d just use this scripted into a component that could be then attached to world entities or even spawned (nuka-cola spillage) / destroyed (clean-up) dynamically:
You can do the same for any type of environmental effect - it does not even need to be damage - anything from radiation build-up, to grenades going off.
The Damage Prevention Channel on that 1st node can be super handy, too! Perhaps there’s something lead-lined we can hide under:
You could designate additional custom trace channels / object types to handle this.
I do have one further question, if you don’t mind. Now that we’re using the damage system for it, how would you work this with a geiger counter sound? A geiger counter would pretty much need to be constantly checking for radiation around it, rather than just once every second (which is fine for damaging a character)
Instead of damage event, you could probably just push some values in since it’d the player who holds the meter which the above actors represents. Since Audio is a component, it opens up your options.
When the player receives radiation interface message (not necessarily damage), have the meter play a looping cue. If no radiation happened in the last second, stop the sound. This part can be improved somehow but should work as is.