Vehicle::setDamage

From RAGE Multiplayer Wiki
Revision as of 21:53, 29 April 2021 by Crltoz (talk | contribs)

Apply damage to vehicle at a location. Location is relative to vehicle model (not world).

Radius of effect damage applied in a sphere at impact location It is enough to use x,y,z values from -1 to 1. When focusOnModel set to true, the damage sphere will travel towards the vehicle from the given point, thus guaranteeing an impact Good values for radius could be from 25 to 200, for damage 50-200. You need to apply delay if you want to call setDamage couple times in a row. Typically 10ms is enough.

Syntax

vehicle.setDamage(xOffset, yOffset, zOffset, damage, radius, p6);

Required Arguments

  • xOffset: float
  • yOffset: float
  • zOffset: float
  • damage: float
  • radius: float
  • focusOnModel: Boolean

Return value

  • Undefined

Example

// todo