REDNODE / GAME API

WeaponObject

classnative name gameweaponObjectnative

extends ItemObject › TimeDilatable › GameObject › GameEntity › Entity › IScriptable › ISerializable

Extended by 8 types

AntiRadar ClaymoreMine drillMachine grenadeSpawner Katana MineDispenser MuteArm ThrowableWeaponObject

Properties 26

NameTypeFlags
AIBlackboardref<IBlackboard>scriptedprivate
animOwnerInt32scriptedprivate
chargeEffectBlackboardref<worldEffectBlackboard>scriptedprivate
chargeStatListenerref<WeaponChargeStatListener>scriptedprivate
damageTypeListenerref<DamageStatListener>scriptedprivate
effectrRef<gameEffectSet>overriding
hasOverheatBoolscriptedprivate
hasSecondaryTriggerModeBoolscriptedprivate
isChargedBoolscriptedprivate
isHeavyWeaponBoolscriptedprivate
isMeleeWeaponBoolscriptedprivate
isRangedWeaponBoolscriptedprivate
isShotgunWeaponBoolscriptedprivate
lowAmmoEffectActiveBoolscriptedprivate
maxChargeThresholdFloatscriptedprivate
meleeHitEffectBlackboardref<worldEffectBlackboard>scriptedprivate
meleeHitEffectValueFloatscriptedprivate
overheatDelaySentBoolscriptedprivate
overheatEffectBlackboardref<worldEffectBlackboard>scriptedprivate
overheatListenerref<OverheatStatListener>scriptedprivate
perfectChargeReachedBoolscriptedprivate
perfectChargeShotBoolscriptedprivate
perfectChargeStartedBoolscriptedprivate
trailNameStringscriptedprivate
triggerEffectNameCNamescriptedprivate
weaponRecordref<WeaponItem_Record>scriptedprivate

Methods 117

native func AI_PlayChargeStartedSound()
native func AI_PlayMeleeAttackSound(isQuickMelee: Bool)
native func AI_SetAttackData(attack: wref<IAttack>)
native func AI_ShootAt(targetPositionProvider: ref<IPositionProvider>, targetObject: ref<GameObject>, instigator: wref<GameObject>, ammoCost: Uint16, projectileParams: gameprojectileWeaponParams, projectilesPerShot: Uint8, charge: Float, opt maxSpread: Float, opt muzzleOffset: Vector4)
native func AI_ShootForwards(instigator: wref<GameObject>, ammoCost: Uint16, projectileParams: gameprojectileWeaponParams, projectilesPerShot: Uint8, charge: Float, opt overridePos: Vector4, opt overrideForward: Vector4, opt muzzleOffset: Vector4)
native func AI_ShootSelfOffScreen(targetObject: ref<gamePuppet>, ammoCost: Uint16, projectileParams: gameprojectileWeaponParams, projectilesPerShot: Uint8, charge: Float)
private final func CatcheTriggerEffectFromWeaponType()scripted
private final func CheckLocked()scripted
native func DefaultRangedAttackPackage() -> Bool
public final const func GetAIBlackboard() -> ref<IBlackboard>scripted
public final const func GetAppearanceNameFromComponent(componentName: CName) -> CNamescripted
native func GetAttack(recordName: CName) -> ref<IAttack>
native func GetAttacks() -> array<ref<IAttack>>
private final func GetBlackboardIntVariable(id: BlackboardID_Int) -> Int32scripted
public final func GetBoolPropertyFromWeaponDefinition(property: TweakDBID) -> Boolscripted
native func GetCurrentAttack() -> ref<IAttack>
private final func GetCurrentDamageType() -> gamedataDamageTypescripted
public final func GetCurrentMeleeTrailEffectName() -> CNamescripted
native func GetCurrentRangedAttack() -> wref<RangedAttackPackage_Record>
native func GetCurrentTriggerMode() -> ref<TriggerMode_Record>
native func GetFxPackage() -> wref<FxPackage>
native func GetFxPackageQuickMelee() -> wref<FxPackage>
native func GetIronSightOffset() -> Vector4
public final func GetMaxChargeTreshold() -> Floatscripted
native func GetMuzzleOffset() -> Vector4
native func GetMuzzleSlotWorldTransform() -> Transform
public final func GetNamePropertyFromWeaponDefinition(property: TweakDBID) -> CNamescripted
private final func GetNextWeaponOwner() -> Int32scripted
private final func GetPerfectChargeWindow() -> Floatscripted
native func GetScopeOffset() -> Vector4
native func GetSharedData() -> ref<IBlackboard>
native func GetTotalAmmoCount() -> Int32
public final const func GetTriggerEffectName() -> CNamescripted
native func GetTriggerModes() -> array<ref<TriggerMode_Record>>
public final const func GetWeaponRecord() -> ref<WeaponItem_Record>scripted
private final func HandleVisualEffectsSetup()scripted
native func HasAmmoChangeRequest() -> Bool
protected final func HasMonowireWithQuickhackSelected() -> Boolscripted
native func HasPendingReload() -> Bool
native func HasScope() -> Bool
public final const func HasSecondaryTriggerMode() -> Boolscripted
public final const func IsBlade() -> Boolscripted
public final const func IsBlunt() -> Boolscripted
public final const func IsCharged() -> Boolscripted
native func IsContinuousAttackStarted() -> Bool
native func IsControlledByPlayer() -> Bool
public final const func IsHeavyWeapon() -> Boolscripted
public final func IsMagazineEmpty() -> Boolscripted
public final const func IsMantisBlades() -> Boolscripted
public final const func IsMelee() -> Boolscripted
public final const func IsMonowire() -> Boolscripted
public final const func IsRanged() -> Boolscripted
public final const func IsShotgun() -> Boolscripted
native func IsSilenced() -> Bool
native func IsTargetLocked() -> Bool
public final const func IsThrowable() -> Boolscripted
native func IsVehiclePowerWeaponRear(vehicle: ref<GameObject>) -> Bool
protected cb func OnAmmoStateChangeEvent(evt: ref<AmmoStateChangeEvent>) -> Boolscripted
private final func OnAttachSetStatPools()scripted
protected cb func OnDetach() -> Boolscripted
protected cb func OnForceFadeOutlineEventForWeapon(evt: ref<ForceFadeOutlineEventForWeapon>) -> Boolscripted
protected cb func OnGameAttached() -> Boolscripted
protected cb func OnMeleeHitEvent(evt: ref<MeleeHitEvent>) -> Boolscripted
protected cb func OnOutlineRequestEvent(evt: ref<OutlineRequestEvent>) -> Boolscripted
protected cb func OnPlayerWeaponSetupEvent(evt: ref<PlayerWeaponSetupEvent>) -> Boolscripted
protected cb func OnRemoveActiveWeapon(evt: ref<RemoveActiveWeaponEvent>) -> Boolscripted
protected cb func OnSetActiveWeapon(evt: ref<SetActiveWeaponEvent>) -> Boolscripted
protected cb func OnSetWeaponOwner(evt: ref<SetWeaponOwnerEvent>) -> Boolscripted
protected cb func OnStartOverheatEffectEvent(evt: ref<StartOverheatEffectEvent>) -> Boolscripted
protected cb func OnUpdateDamageChangeEvent(evt: ref<UpdateDamageChangeEvent>) -> Boolscripted
protected cb func OnUpdateMeleeTrailEffect(evt: ref<UpdateMeleeTrailEffectEvent>) -> Boolscripted
protected cb func OnUpdateOverheat(evt: ref<UpdateOverheatEvent>) -> Boolscripted
protected cb func OnUpdateWeaponCharge(evt: ref<UpdateWeaponChargeEvent>) -> Boolscripted
private final func OnUpdateWeaponStatsEvent(evt: ref<UpdateWeaponStatsEvent>)scripted
protected cb func OnVisualSpawnAttached() -> Boolscripted
protected cb func OnWaponeventsOwnerAimEvent(evt: ref<gameweaponeventsOwnerAimEvent>) -> Boolscripted
protected cb func OnWeaponRegisterChargeStatListener(evt: ref<WeaponRegisterChargeStatListener>) -> Boolscripted
native func OverrideRangedAttackPackage(package: wref<RangedAttackPackage_Record>) -> Bool
private final func PlayMeleeSound()scripted
private final func PlayMeleeSound(self: ref<GameObject>, soundName: CName)scripted
private final func PlayPerfectChargeEvent(self: ref<GameObject>, type: CName)scripted
private final func PlayPerfectChargeUIEvent(type: CName)scripted
native func PrepareContinuousAttack(startPos: Vector4, startDir: Vector4)
private final func RegisterChargeStatListener()scripted
private final func RegisterStatListeners()scripted
private final func RegisterStatPoolListeners()scripted
native func RemoveWeaponEffects()
private final func SendScopeData()scripted
private final func SendWeaponOwnerVehicleData()scripted
private final func SendWeaponStatsAnimFeature()scripted
native func SetAttack(attackID: TweakDBID) -> Bool
public final func SetCharged(charged: Bool)scripted
private final func SetCurrentMeleeTrailEffect(damageType: gamedataDamageType)scripted
public final func SetMaxChargeThreshold(maxCharge: Float)scripted
native func SetTriggerDown(triggerDown: Bool)
native func SetupBurstFireSound(numShotsInBurst: Int32)
private final func SetupWeaponEffects()scripted
native func SetVisible(visible: Bool)
native func SetWeaponEffects(weaponVFXActionRecord: array<wref<WeaponVFXAction_Record>>)
private final func SetWeaponOwner()scripted
private final func SetWeaponOwner(owner: Int32)scripted
native func ShootStraight(shootStraight: Bool)
native func StartContinuousAttack(startPos: Vector4, startDir: Vector4) -> Bool
public final func StartCurrentMeleeTrailEffect(opt attackSide: String)scripted
private final func StartIdleMeleeEffect(damageType: gamedataDamageType)scripted
protected final func StartOverheatEffect()scripted
native func StartPreparedContinuousAttack() -> Bool
native func StartReload(opt durationOverride: Float) -> Float
native func StopContinuousAttack()
public final func StopCurrentMeleeTrailEffect(opt attackSide: String)scripted
private final func StopMeleeSound()scripted
private final func StopMeleeSound(self: ref<GameObject>, soundName: CName)scripted
native func StopReload(opt reloadStatus: gameweaponReloadStatus)
static native func TriggerWeaponEffects(weapon: wref<WeaponObject>, fxAction: gamedataFxAction, opt fxBlackboard: ref<worldEffectBlackboard>)
private final func UnregisterChargeStatListener()scripted
native func UpdateTargetingSight(targetID: EntityID, targetPosition: Vector4) -> Bool
public final const func WeaponHasTag(tag: CName) -> Boolscripted