UxrFirearmWeapon.TryToShootRound Method

Tries to shoot a round using the given trigger.

Namespace: UltimateXR.Mechanics.Weapons
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public bool TryToShootRound(
	int triggerIndex
)

Parameters

 

triggerIndex
Type: System.Int32
Index in _triggers

Return Value

Type: Boolean
Whether a round was shot. If no round was shot it can mean that:  

  • The trigger index references an entry that doesn’t exist.
  • The firearm isn’t loaded.
  • The firearm doesn’t have any ammo left or there is no magazine attached.
  • The shoot frequency doesn’t allow to shoot again so quickly.

See Also

Reference

UxrFirearmWeapon Class
UltimateXR.Mechanics.Weapons Namespace