Background for Fallout 4
Member of the Actor script
WeaponfunctionGetEquippedWeapon(intaiEquipIndex=0)Native

Description

Wiki Description

Gets the actor's currently equipped weapon.

Documentation Comment

Gets this actor's currently equipped weapon for the specified equip index
Defaults to the actor's first equip index


Caveats


Parameters

intaiEquipIndex=0

CK Wiki Description

The equip index to get the equipped weapon for

  • Default:0 - The default will use the actors default equip slot

Examples

; Does the player have the uber dagger equipped in their first equip slot?
if (Game.GetPlayer().GetEquippedWeapon() == UberDagger)
  Debug.Trace("Player has uber-dagger equipped in their first equip slot")
endIf
; Does the player have the wimpy sword equipped in their second equip slot?
if (Game.GetPlayer().GetEquippedWeapon(1) == WimpyDagger)
  Debug.Trace("Player has wimpy sword in their second equip slot")
endIf

Auto-Generated Example

int myInt__aiEquipIndex

Weapon returnedValue = myActor__toCallFunctionOn.GetEquippedWeapon(myInt__aiEquipIndex)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.