EnvShakeclass
Shakes players' screens - and optionally physics objects - around a point. Half-Life's env_shake. Call `Sandbox.Mapping.EnvShake.StartShake` to set it off on every player, and it runs a `Sandbox.Mapping.EnvShake.Duration` second cycle, the curves shaping it over that time. `Sandbox.Mapping.EnvShake.Loop` repeats the cycle until turned off.
Constructors1
Showing 1 constructors
public EnvShake()
No results match this filter.
Methods2
Showing 2 methods
public void StartShake()
Set the shake off on everyone, restarting the cycle if it's already running.
void—public void StopShake()
Stop a running shake on everyone.
void—No results match this filter.
Properties11
Showing 11 properties
public Sandbox.ParticleFloat Sandbox.Mapping.EnvShake.Amplitude { get; set; }
How far the view gets thrown over the cycle, in world units.
public float Sandbox.Mapping.EnvShake.Duration { get; set; }
Seconds one shake cycle lasts - the curves play out over this.
float—public Sandbox.ParticleFloat Sandbox.Mapping.EnvShake.Frequency { get; set; }
Direction changes per second over the cycle - low is a slow lurch, high is a violent tremble.
public bool Sandbox.Mapping.EnvShake.GlobalShake { get; set; }
Shake every player in the scene at full strength, no matter where they are.
bool—public bool Sandbox.Mapping.EnvShake.Loop { get; set; }
Restart the cycle when it ends, shaking until turned off.
bool—public bool Sandbox.Mapping.EnvShake.On { get; set; }
Is the shake running? Local to this machine - map-placed shakes start everywhere because the scene ships with it set, but toggling it at runtime only affects this peer. Use `Sandbox.Mapping.EnvShake.StartShake`/`Sandbox.Mapping.EnvShake.StopShake` to run one on every player. A non-looping shake turns itself off when its cycle ends.
bool—public float Sandbox.Mapping.EnvShake.Radius { get; set; }
How far the shake reaches, fading to nothing at the edge. The view ignores this when `Sandbox.Mapping.EnvShake.GlobalShake` is set - physics always uses it.
float—public bool Sandbox.Mapping.EnvShake.Rumble { get; set; }
Rumble controllers along with the shake.
bool—public Sandbox.ParticleFloat Sandbox.Mapping.EnvShake.Scale { get; set; }
Overall strength over the cycle - fade the whole shake in or out without retuning the others.
public bool Sandbox.Mapping.EnvShake.ShakePhysics { get; set; }
Throw physics objects around within `Sandbox.Mapping.EnvShake.Radius` while shaking.
bool—public bool Sandbox.Mapping.EnvShake.ShakeView { get; set; }
Shake the view. Turn off for a physics-only shake.
bool—No results match this filter.