Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Random event generator in my WIP map

Loading...

Sign in or sign up now!
2,599
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 3, 2008

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.

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (TheMightyAtomNL)

  • true, but you could make a trigger activate a logic_timer and set random timing, if thats what you mean

  • This is a GoldSource map, not a Source one. :)

see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • its makeing crack

  • Interesting. It is dumb that HL has no 'random trigger' entity (triggers randomly X number of times every X seconds with X seconds minimum between triggers). This is really clever, but the limitation is that you can't control (even loosely) the frequency, and it is way too frequent for most uses.

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more