GetReplacedItemType
Jump to navigation
Jump to search
GetReplacedItemType takes a casting source (e.g. left hand, right hand, voice) as a parameter. Reverse-engineering indicates that this function appears to check the animation type of the last weapon the actor held in that casting source.
When an actor equips or unequips an item, the game engine checks their iLeftHandType and iRightHandType animation graph variables, and copies those variables' values into fields in the actor's AI process. Those fields are what this condition function returns. The following edge-cases exist:
- If run on a non-existent ref, a ref that isn't an actor, or an actor that has no AI process, this function returns 0.
- If run on a valid actor with an AI process, with a casting source that isn't the left or right hand, this function returns -1.
- If run on a valid actor with an AI process, with a casting source that is the left or right hand, this function could hypothetically return -1 if the actor has never held anything in that hand.