DIFF

class SandstormController

Constructors 2

private void SandstormController()

Creation of `SandstormController` is disallowed in scripts. Retrieve current instance using `Weather::GetSandstorm()` instead.

private void ~SandstormController()

Methods 16

proto native bool Start(float duration, bool calledByWeather)
proto native void Stop(float duration, bool calledByWeather)

Stops the sandstorm, leaving it to fade out over `duration` seconds. The sandstorm must be active prior to this call and this call is Server-only.

duration
The duration in seconds over which the sandstorm gradually fades out towards 0 intensity.
proto native vector GetDirection()

Returns the direction from the start position to the end position of the sandstorm.

Returns: Directional vector of the sandstorm facing.

Referenced by DayZGame.OnRPC()
proto native bool IsPositionAtEnd()

Returns whether the sandstorm has advanced and reached the end (final) position. The sandstorm must be active prior to this call!

proto native vector GetPosition()

Returns the current position of the sandstorm in world space. The sandstorm must be active prior to this call!

proto native float GetSpeed()

Returns the speed in m/s at which the sandstorm advances. The sandstorm must be active prior to this call!

proto native float GetRemainingMovementDuration()

Returns the remaining movement duration until the sandstorm reached its end (final) position at its current speed in seconds. The sandstorm must be active prior to this call!

proto native float GetPointOnEdge(vector worldPosition, out vector outPosition)

Projects the provided `worldPosition` to the edge of the sandstorm. The sandstorm must be active prior to this call!

worldPosition
Input position to project, in world space.
outPosition
Projection of the input position on the sandstorm edge in world space.

Returns: Returns the distance to the edge (Negative for points beyond the edge, i.e. inside the sandstorm)

proto native float GetIntensity(vector worldPosition)

Returns the intensity of the sandstorm at a given position in world space. The sandstorm must be active prior to this call!

worldPosition
Input position to project, in world space.
float GetIntensityForPlayer(Man player)

Returns the intensity of the sandstorm at a players head position in world space. Value is influenced by external factors like interrior/underground conditions. The sandstorm must be active prior to this call!

Man
object.
proto native float GetMagnitude()

Returns the magnitude of the sandstorm - the intensity independent of its position.

Returns: Returns the peak intensity of the active storm.

protected event void OnStart(bool continuedSession, bool calledByWeather = false)

Callback raised when the sandstorm becomes active. Raised for both the server and the client.

NoteFor clients joining a in progress this event will be raised even if the sandstorm has already been in progress on the server prior.
protected event void OnUpdate(float deltaTime)

Callback raised every tick for as long as the sandstorm is active. Raised for both the server and the client.

deltaTime
Time step since last update.
protected event void OnStop(bool calledByWeather = false)

Callback raised when the sandstorm becomes inactive. Raised for both the server and the client.

private static event typename GetScriptedType()

This method may be implemented to override the default sandstorm controller class instantiated by the Weather controller. Provided class must be inherited from the SandstormController class and must exist in the World module or lower.

NoteThis method is optional. It may be left empty for default native behavior.
References string.ToType()