Class UnturnedVehicleDamagingEvent
The event that is triggered when damage is being dealt to a vehicle.
Namespace: OpenMod.Unturned.Vehicles.Events
Assembly: OpenMod.Unturned.dll
Syntax
public class UnturnedVehicleDamagingEvent : UnturnedVehicleEvent, IVehicleEvent, IEvent, ICancellableEvent
Constructors
| Improve this Doc View SourceUnturnedVehicleDamagingEvent(UnturnedVehicle, Nullable<CSteamID>, UInt16, EDamageOrigin, Boolean)
Declaration
public UnturnedVehicleDamagingEvent(UnturnedVehicle vehicle, CSteamID? instigator, ushort pendingTotalDamage, EDamageOrigin damageOrigin, bool canRepair)
Parameters
Type | Name | Description |
---|---|---|
UnturnedVehicle | vehicle | |
System.Nullable<CSteamID> | instigator | |
System.UInt16 | pendingTotalDamage | |
EDamageOrigin | damageOrigin | |
System.Boolean | canRepair |
Properties
| Improve this Doc View SourceCanRepair
If set to true, the damage will not explode the vehicle if its greater than the current health.
Declaration
public bool CanRepair { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DamageOrigin
Gets the damage origin.
Declaration
public EDamageOrigin DamageOrigin { get; }
Property Value
Type | Description |
---|---|
EDamageOrigin |
Instigator
Gets the ID of the entity causing the damage.
Declaration
public CSteamID? Instigator { get; }
Property Value
Type | Description |
---|---|
System.Nullable<CSteamID> |
IsCancelled
Declaration
public bool IsCancelled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PendingTotalDamage
Gets or sets the total damage to be dealt.
Declaration
public ushort PendingTotalDamage { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Implements
ICancellableEvent