Here's a demonstration of a random event generator in my WIP map for Half-Life Deathmatch (GoldSource) dubbed dm_highnrj.
What you see is a green christal being randomly zapped by an env_beam entity. Every time the beam hits the christal, an amnient_generic is triggered for the sound and small glowing sprites are emitted from the center of the christal by four env_shooter with different course variances and gib velocities, creating a random spread.
The technical part behind this is the following:
The actualy random event generator consists of the following entities:
1 env_beam (named green_zapper)
1 func_button
2 trigger_relays
3 info_targets (two of them are start entity and one is the end entity for the beam)
A func_button is placed between the start and end entities. When the beam arcs through the button, the button takes damage which can be use to trigger anything you like. Im this case, the button triggers the two trigger_relays. One relay triggers the env_beam for the christal on, while the second trigger_relay triggers the same env_beam 0.05 seconds later, turning it off again.
The env_shooters and the ambient_generic are also named green_zapper so that they all are triggered when the random event generator beam arcs through the button, causing it to fire its target, which are the trigger_relays.
For this to work, the buttons must have the Don't move and Toggles flags checked.
For the REG beam make sure that the Strike again time (secs) and Damage / second both have a value specified. Finally, check the Random Strike flag.
If there is interest in an example map, ill add a download link in the discription. Just keep in mind that this is for GOLDSOURCE only! It should work in any GoldSource game/mod.
true, but you could make a trigger activate a logic_timer and set random timing, if thats what you mean
xRewaSx 2 years ago
This is a GoldSource map, not a Source one. :)
TheMightyAtomNL 2 years ago