EntGun
Gun
Fires a Projectile
ID: EntGun
Required By: Gun Animation On Fire, Gun Chargable, Gun Charge With Pullable Part, Gun Cycle Shot Position, Gun Loadable, Gun Shell Position, Gun Shoot On Releasing Pullable Part, Gun Shoot On Trigger, Minigun Shoot With Rotatable Part
Base Type: Entity Component
Values
Name | Type | Description |
---|---|---|
Projectile | Projectile Variable | Projectile asset that will be fired |
Shot Position | Transform Part Variable | Transform to fire projectile from |
Take Ammo | Bool Variable | If firing should require Ammo from a Ammo Container |
Next Shot | Play Time Variable | Time till next shot, set by projectile asset refire time - - ReadOnly |
Using Ammo Container | Entity Component Variable | The AmmoContainer this Gun is using. Based on if it uses Ammo and it's Projectile - will find any AmmoContainer on the Entity/Body - - ReadOnly |
Methods
Name | Description |
---|---|
Shoot | |
Shoot With Charge | |
Shoot With Charge At(Number charge, Vector3 worldPosition, Vector3 worldRotation) | Shoot Projectile at a specific position/angle |
Events
Name | Description |
---|---|
Gun Shot() | On Projectile fired |
On Projectile Hit(Projectile Hit Info info) | Called when a projectile from this gun hit something |
Next Shot Lapsed() | Called when Next Shot time Lapses |
Updated almost 2 years ago