GameBanana shows no ads to members. Sign up now!
Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Random Function

A Map Prefab for Half-Life


The “prefab” visgroup encompasses all the prefab entity of the random function.

Breakdown: An env_beam using itself as Start Entity points into hurtable buttons having an origin brush. The env_beam is off by default, has 1 as Life, -1 as Strike Again and has the Toggle flag checked. When the buttons are hit, the related multi_manager turns the env_beam off and the custom target is called.
The randomness comes from the built-in target selection algorithm of the env_beam. In fact, all buttons have the same Name. The Random Strike flag is TOTALLY unrelated.

Entities Manifest : (See readme file)

Entities Count:        9 (5 + 2 per additional choices)

Number of Choices

The number of possible targets can be changed by adding/removing hurtable buttons with origin brush.

To customize the odds, one can remove the origin brush and use info_target instead. While this adds an entity, adding multiple info_target under a single button changes its odds of being hit.


The button has been given a very high hp (and the laser a very large damage/sec value), this is to prevent the mechanism from being activated through doors with the gauss.

The button "delay before reset" has been set to 3.5 for the button. This is to allow the laser to display correctly. (Lower values makes the laser hit its previous position before the new one). You might want to set the laser invisible (by setting beam color to 0 0 0) before use.


Sign up to access this!


Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code


Key Authors
olograph Joined 2y ago
367 points Ranked 49290th


olograph avatar
olograph Joined 2y ago
367 points Ranked 49290th
  • Paypal Donate
Sign up to access this!
Sign up to access this!
Sign up to access this!


Sign up to access this!




  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 3
  • 13
  • 1.3k
  • 2
  • 1y
  • 1y

More from Submitter

More Other/Misc Prefabs