Difference between revisions of "GetVampireFeed"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>SJML Bot
(Bot creating condition functions pages.)
 
imported>DavidJCobb
(command's functionality verified through disassembly)
 
Line 1: Line 1:
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 "[[SetPlayerAIDriven - Game|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.


[[Category:Condition Functions]]
[[Category:Condition Functions]]

Latest revision as of 11:35, 23 July 2018

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.