func_fish_pool
Class hierarchy |
---|
CFishPool |
fish.cpp
|
func_fish_pool
is a point entity available in all Source games.
It creates a school of interactive fish
that swim near this entity.
The fish themselves are being moved around slowly, and will scatter away quickly when being shot at, but they can not be hurt or individually picked off by shooting them.
The fish can also get stuck on geometry, such as the poles holding a pier, or boats that are placed on the water.
It appears as though the animation on the fish speeds up when they flee, and slows down when idly swimming about.
Furthermore, at least in Left 4 Dead 2 using relays to kill the fish entities crashes the game, every time, no matter what.
Keyvalues
- Name
(targetname)
<string> - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- World model
(model)
<model path> - Model spawned fish use.
- Fish Count
(fish_count)
<integer> - Number of fish in this pool.
- Max Range
(max_range)
<float> - How far away a fish can wander, in units. Maximum is 255 units.
Lighting Issues
Fish spawned by this entity can cause lighting issues, where all dynamic props (including doors and viewmodels) appear to flicker dark.
This may appear when a mere 30 fish have been spawned. Adding $donotcastshadows to the fish models did not help.
Furthermode, these fish will not fade out like any other prop, since Fademindist and Fademaxdist do not exist for Func_Fish_Pool, or Fish.
Add a hollow box of Func_areaportal around all Func_Fish_Pool entities, including their "Max Range". Every side should be an individual func_areaportal with the same name, all of which closed by default.
Add a trigger_multiple in the spot where you want the fish to be visible when stood in, with the following outputs:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
OnStartTouch | Func_areaportal | open | <none> | 0.00 | No | |
OnEndTouchAll | Func_areaportal | close | <none> | 0.00 | No |
Console Commands
Fish entities have two console commands.
Command | Default | Parameters | Description |
---|---|---|---|
fish_debug | 0 | "cheat", "cl" | Show debug info for fish |
fish_dormant | 0 | "sv", "cheat", "rep" | Turns off interactive fish behavior. Fish become immobile and unresponsive. |
Fish
The fish
entities spawned by the func_fish_pool can not be interacted with. They do not have any unique inputs, other than being able to be killed with console commands.
Killing the fish via relays in some games crash the game even when done in proper order by killing the func_fish_pool first, making the fish nothing but an interactive decoration.
They are comparable to particles, except they are made of models and respond to player proximity as well as gunshots near them.