RampRumble - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Intended as a quick way to cause some controller and camera rumble. Automatically tapers intensity of the effect based on players distance from the point of origin/calling reference.

Syntax[edit | edit source]

bool Function RampRumble(float power = 0.5, float duration = 0.25, float falloff = 1600.0)

Parameters[edit | edit source]

  • power: How powerful this rumble is at the point of origin
    • Default: 0.5, which is the half intensity. Valid values are 0.001 - 1.0, with 1.0 being the most intense effect possible
  • duration: how long should the effect last?
    • Default: 0.25
  • falloff: Radius of the effect. Most intense at calling reference, tapers to nothing at falloff distance
    • Default: 1600

Return Value[edit | edit source]

Returns false if no rumble is applied. (Invalid parameter values are clamped and won't cause it to fail)

Examples[edit | edit source]

; cause some intense camera/controller rumble originating from the marker, with a small radius
; send debug traces to let me know if any rumble was caused
if (!RumbleMarker.RampRumble(1.0, 0.25, 512))
     debug.trace("RampRumble() didn't cause any shake.  Player too far away?")
else
     debug.trace("player's world was rocked")
endif


; simple controller/camera shake
RumbleMarker.RampRumble()

See Also[edit | edit source]