GetVampireFeed

From the CreationKit Wiki
Revision as of 11:35, 23 July 2018 by imported>DavidJCobb (command's functionality verified through disassembly)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If this function is run on the player, then it checks whether the player is currently feeding on another actor as a vampire; it returns 1.0 if the player is feeding, or 0.0 otherwise. If the function is run on any other reference, it returns 0.0.

Internally, the function checks whether the player is running any AI package of type 37, which is used specifically for vampire feeding. When the player feeds on another actor, their character model is flagged as "AI-driven:" the player loses control of the character, and the character is forced to execute an AI package (with type 37) that the executable creates at run-time. As GetCurrentAIPackage is capped at 31, GetVampireFeed is the only way to check for type 37.