Difference between revisions of "Actor Script"
imported>JLundin (→Events) |
m (Spelling error 'abSlient' changed to 'abSilent') |
||
(26 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Actor]] | |||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Papyrus]] | [[Category:Papyrus]] | ||
Line 7: | Line 8: | ||
'''Extends:''' [[ObjectReference Script]] | '''Extends:''' [[ObjectReference Script]] | ||
Script for the manipulation of actor instances. | Script for the manipulation of [[actor]] instances. | ||
== Definition == | == Definition == | ||
Line 21: | Line 22: | ||
== Member Functions == | == Member Functions == | ||
''' | '''[[AddPerk - Actor|AddPerk]](Perk ''akPerk'')''' | ||
*Adds the specified perk to this actor. | *Adds the specified perk to this actor. | ||
''' | '''Bool [[AddShout - Actor|AddShout]](Shout ''akShout'')''' | ||
*Adds the specified shout to this actor. | *Adds the specified shout to this actor. | ||
''' | '''Bool [[AddSpell - Actor|AddSpell]](Spell ''akSpell'', Bool ''abVerbose'')''' | ||
*Adds the specified spell to this actor. | *Adds the specified spell to this actor. | ||
''' | '''[[AddToFaction - Actor|AddToFaction]](Faction ''akFaction'')''' | ||
*Adds the actor to the specified faction at rank 0. If the Actor is already in the given faction, this function does nothing. | *Adds the actor to the specified faction at rank 0. If the Actor is already in the given faction, this function does nothing. | ||
''' | '''[[AllowBleedoutDialogue - Actor|AllowBleedoutDialogue]](Bool ''abCanTalk'')''' | ||
*Flags this actor as able to speak to the player when he is in bleed out and is essential down | *Flags this actor as able to speak to the player when he is in bleed out and is essential down | ||
''' | '''[[AllowPCDialogue - Actor|AllowPCDialogue]](Bool ''abTalk'')''' | ||
*Enables or disables the player's ability to talk to this actor. | *Enables or disables the player's ability to talk to this actor. | ||
''' | '''[[AttachAshPile - Actor|AttachAshPile]](Form ''akAshPileBase'')''' | ||
*Attaches an "ash pile" to this actor using the passed-in form (or leveled item list) as a base. | *Attaches an "ash pile" to this actor using the passed-in form (or leveled item list) as a base. | ||
''' | '''Bool [[CanFlyHere - Actor|CanFlyHere]]()''' | ||
*Can this actor fly here? | *Can this actor fly here? | ||
''' | '''[[ClearArrested - Actor|ClearArrested]]()''' | ||
*Clears this actor's arrested state. | *Clears this actor's arrested state. | ||
''' | '''[[ClearExpressionOverride - Actor|ClearExpressionOverride]]()''' | ||
*Clears any expression override on this actor. | *Clears any expression override on this actor. | ||
''' | '''[[ClearExtraArrows - Actor|ClearExtraArrows]]()''' | ||
*Clears any arrow 3d on the actor. | *Clears any arrow 3d on the actor. | ||
''' | '''[[ClearForcedLandingMarker - Actor|ClearForcedLandingMarker]]()''' | ||
*Clears any forced landing marker on this actor. | *Clears any forced landing marker on this actor. | ||
''' | '''[[ClearKeepOffsetFromActor - Actor|ClearKeepOffsetFromActor]]()''' | ||
*Clears any keep offset from this actor. | *Clears any keep offset from this actor. | ||
''' | '''[[ClearLookAt - Actor|ClearLookAt]]()''' | ||
*Clears this actor's script-forced look at target. | *Clears this actor's script-forced look at target. | ||
''' | '''[[DamageActorValue - Actor|DamageActorValue]](String ''asValueName'', Float ''afDamage'')''' | ||
*Damages the specified actor value by the specified amount. | *Damages the specified actor value by the specified amount. | ||
''' | '''[[DamageActorValue - Actor|DamageAV]](String ''asValueName'', Float ''afDamage'')''' | ||
*Alias for DamageActorValue(). | *Alias for DamageActorValue(). | ||
''' | '''Bool [[Dismount - Actor|Dismount]]()''' | ||
*Forces the actor to dismount. | *Forces the actor to dismount. | ||
''' | '''[[DispelAllSpells - Actor|DispelAllSpells]]()''' | ||
*Dispel all spell from this actor | *Dispel all spell from this actor | ||
''' | '''Bool [[DispelSpell - Actor|DispelSpell]](Spell ''akSpell'')''' | ||
*Dispel a spell from this actor | *Dispel a spell from this actor | ||
''' | '''[[DoCombatSpellApply - Actor|DoCombatSpellApply]](Spell ''akSpell'', ObjectReference ''akTarget'')''' | ||
*Apply a spell to a target in combat | *Apply a spell to a target in combat | ||
''' | '''[[DrawWeapon - Actor|DrawWeapon]]()''' | ||
*Forces this actor to draw his weapon | *Forces this actor to draw his weapon | ||
''' | '''[[EnableAI - Actor|EnableAI]](Bool ''abEnable'')''' | ||
*Enables or disables this actor's AI. | *Enables or disables this actor's AI. | ||
''' | '''[[EndDeferredKill - Actor|EndDeferredKill]]()''' | ||
*Removes the actor from a Deferred Kill state. | *Removes the actor from a Deferred Kill state. | ||
''' | '''[[EquipItem - Actor|EquipItem]](Form ''akItem'', Bool ''abPreventRemoval'', Bool ''abSilent'')''' | ||
*Equips the specified item on this actor. | *Equips the specified item on this actor. | ||
''' | '''[[EquipShout - Actor|EquipShout]](Shout ''akShout'')''' | ||
*Forces this actor to equip this shout. | *Forces this actor to equip this shout. | ||
''' | '''[[EquipSpell - Actor|EquipSpell]](Spell ''akSpell'', Int ''aiSource'')''' | ||
*Forces this actor to equip thes spell, in the specified source. | *Forces this actor to equip thes spell, in the specified source. | ||
''' | '''[[EvaluatePackage - Actor|EvaluatePackage]]()''' | ||
*Forces the AI to re-evaluate its package stack. | *Forces the AI to re-evaluate its package stack. | ||
''' | '''[[ForceActorValue - Actor|ForceActorValue]](String ''asValueName'', Float ''afNewValue'')''' | ||
*Forces the specified actor value to the specified value. | *Forces the specified actor value to the specified value. | ||
''' | '''[[ForceActorValue - Actor|ForceAV]](String ''asValueName'', Float ''afNewValue'')''' | ||
*Alias for ForceActorValue(). | *Alias for ForceActorValue(). | ||
'''ActorBase | '''ActorBase [[GetActorBase - Actor|GetActorBase]]()''' | ||
*Returns the base actor object for this actor. | *Returns the base actor object for this actor. | ||
''' | '''Float [[GetActorValue - Actor|GetActorValue]](String ''asValueName'')''' | ||
*Retrieves the specified actor value from the actor. | *Retrieves the specified actor value from the actor. | ||
''' | '''Float [[GetActorValuePercentage - Actor|GetActorValuePercentage]](String ''asValueName'')''' | ||
*Retrieves the specified actor value from the actor as a percentage of its maximum value. (From 0 to 1) | *Retrieves the specified actor value from the actor as a percentage of its maximum value. (From 0 to 1) | ||
''' | '''Float [[GetActorValue - Actor|GetAV]](String ''asValueName'')''' | ||
*Alias for GetActorValue(). | *Alias for GetActorValue(). | ||
''' | '''Float [[GetActorValuePercentage - Actor|GetAVPercentage]](String ''asValueName'')''' | ||
*Alias for GetActorValuePercentage(). | *Alias for GetActorValuePercentage(). | ||
''' | '''Float [[GetBaseActorValue - Actor|GetBaseActorValue]](String ''asValueName'')''' | ||
*Gets the base value of the specified actor value. | *Gets the base value of the specified actor value. | ||
''' | '''Float [[GetBaseActorValue - Actor|GetBaseAV]](String ''asValueName'')''' | ||
*Alias for GetBaseActorValue(). | *Alias for GetBaseActorValue(). | ||
''' | '''Int [[GetBribeAmount - Actor|GetBribeAmount]]()''' | ||
*Returns the amount of gold required to bribe this actor. | *Returns the amount of gold required to bribe this actor. | ||
'''Faction | '''Faction [[GetCrimeFaction - Actor|GetCrimeFaction]]()''' | ||
*Obtains this actor's crime faction. | *Obtains this actor's crime faction. | ||
''' | '''Int [[GetCombatState - Actor|GetCombatState]]()''' | ||
*Obtains this actor's current combat state. | *Obtains this actor's current combat state. | ||
'''Actor | '''Actor [[GetCombatTarget - Actor|GetCombatTarget]]()''' | ||
*Obtains this actor's current combat target. | *Obtains this actor's current combat target. | ||
'''Package | '''Package [[GetCurrentPackage - Actor|GetCurrentPackage]]()''' | ||
*Obtains the current package this actor's AI is running. | *Obtains the current package this actor's AI is running. | ||
'''Actor | '''Actor [[GetDialogueTarget - Actor|GetDialogueTarget]]()''' | ||
*Obtains the actor's current dialogue target | *Obtains the actor's current dialogue target | ||
''' | '''Int [[GetEquippedItemType - Actor|GetEquippedItemType]](Int ''aiHand'')''' | ||
*Obtains the type of item equipped in the specified hand. | *Obtains the type of item equipped in the specified hand. | ||
'''Armor | '''Armor [[GetEquippedShield - Actor|GetEquippedShield]]()''' | ||
*Obtains the currently equipped shield on this actor. | *Obtains the currently equipped shield on this actor. | ||
'''Shout | '''Shout [[GetEquippedShout - Actor|GetEquippedShout]]()''' | ||
*Obtains the currently equipped shout on this actor. | *Obtains the currently equipped shout on this actor. | ||
'''Spell | '''Spell [[GetEquippedSpell - Actor|GetEquippedSpell]](Int ''aiSource'')''' | ||
*Obtains the currently equipped spell in the specified source on this actor. | *Obtains the currently equipped spell in the specified source on this actor. | ||
'''Weapon | '''Weapon [[GetEquippedWeapon - Actor|GetEquippedWeapon]](Bool ''abLeftHand'')''' | ||
*Obtains the currently equipped weapon on this actor. | *Obtains the currently equipped weapon on this actor. | ||
''' | '''Int [[GetFactionRank - Actor|GetFactionRank]](Faction ''akFaction'')''' | ||
*Retrieves this actor's rank in the specified faction. | *Retrieves this actor's rank in the specified [[Faction Script|faction]]. | ||
''' | '''Int [[GetFactionReaction - Actor|GetFactionReaction]](Actor ''akOther'')''' | ||
*Obtains this actor's faction-based reaction to the other actor. | *Obtains this actor's faction-based reaction to the other actor. | ||
''' | '''Int [[GetFlyingState - Actor|GetFlyingState]]()''' | ||
*Obtains this actor's current flying state. | *Obtains this actor's current flying state. | ||
'''ObjectReference | '''ObjectReference [[GetForcedLandingMarker - Actor|GetForcedLandingMarker]]()''' | ||
*Obtains the landing marker the actor is forced to land at (if any). | *Obtains the landing marker the actor is forced to land at (if any). | ||
''' | '''Int [[GetGoldAmount - Actor|GetGoldAmount]]()''' | ||
*Gets the amount of gold this actor has on his person. | *Gets the amount of gold this actor has on his person. | ||
''' | '''Int [[GetHighestRelationshipRank - Actor|GetHighestRelationshipRank]]()''' | ||
*Gets this actor's highest relationship rank. | *Gets this actor's highest relationship rank. | ||
'''Actor | '''Actor [[GetKiller - Actor|GetKiller]]()''' | ||
*Gets this actor's killer. Returns None if this actor isn't dead. | *Gets this actor's killer. Returns None if this actor isn't dead. | ||
''' | '''Int [[GetLevel - Actor|GetLevel]]()''' | ||
*Gets this actor's current level. | *Gets this actor's current level. | ||
'''ActorBase | '''ActorBase [[GetLeveledActorBase - Actor|GetLeveledActorBase]]()''' | ||
*Returns a leveled actor's "temporary" base object. | *Returns a leveled actor's "temporary" base object. | ||
''' | '''Float [[GetLightLevel - Actor|GetLightLevel]]()''' | ||
*Returns this actor's current light level | *Returns this actor's current light level | ||
''' | '''Int [[GetLowestRelationshipRank - Actor|GetLowestRelationshipRank]]()''' | ||
*Gets this actor's lowest relationship rank. | *Gets this actor's lowest relationship rank. | ||
''' | '''Bool [[GetNoBleedoutRecovery - Actor|GetNoBleedoutRecovery]]()''' | ||
*Gets whether this actor can recover from bleedout or not. | *Gets whether this actor can recover from bleedout or not. | ||
''' | '''Bool [[GetPlayerControls - Actor|GetPlayerControls]]()''' | ||
*Queries whether this actor receives player input | *Queries whether this actor receives player input | ||
'''Race | '''Race [[GetRace - Actor|GetRace]]()''' | ||
*Returns this actor's race. | *Returns this actor's race. | ||
''' | '''Int [[GetRelationshipRank - Actor|GetRelationshipRank]](Actor ''akOther'')''' | ||
*Retrieves the relationship rank between this actor and another. | *Retrieves the relationship rank between this actor and another. | ||
''' | '''Int [[GetSitState - Actor|GetSitState]]()''' | ||
*Obtains this actor's sit state. | *Obtains this actor's sit state. | ||
''' | '''Int [[GetSleepState - Actor|GetSleepState]]()''' | ||
*Obtains this actor's sleep state. | *Obtains this actor's sleep state. | ||
''' | '''Float [[GetVoiceRecoveryTime - Actor|GetVoiceRecoveryTime]]()''' | ||
*Gets the voice recovery time from the actor. | *Gets the voice recovery time from the actor. | ||
''' | '''Bool [[HasAssociation - Actor|HasAssociation]](AssociationType ''akAssociation'', Actor ''akOther'')''' | ||
*Returns whether this actor has the specified association with the other actor. | *Returns whether this actor has the specified association with the other actor. | ||
''' | '''Bool [[HasFamilyRelationship - Actor|HasFamilyRelationship]](Actor ''akOther'')''' | ||
*Returns whether this actor has a family relationship with the other actor. | *Returns whether this actor has a family relationship with the other actor. | ||
''' | '''Bool [[HasLOS - Actor|HasLOS]](ObjectReference ''akOther'')''' | ||
*Checks to see if this actor has line-of-sight to another. (Only the player can do a LOS check to a non-actor) | *Checks to see if this actor has line-of-sight to another. (Only the player can do a LOS check to a non-actor) | ||
''' | '''Bool [[HasMagicEffect - Actor|HasMagicEffect]](MagicEffect ''akEffect'')''' | ||
*Checks to see if this actor is currently being affected by the given Magic Effect | *Checks to see if this actor is currently being affected by the given Magic Effect | ||
''' | '''Bool [[HasMagicEffectWithKeyword - Actor|HasMagicEffectWithKeyword]](Keyword ''akKeyword'')''' | ||
*Checks to see if this actor is currently being affected by a Magic Effect with the given Keyword | *Checks to see if this actor is currently being affected by a Magic Effect with the given Keyword | ||
''' | '''Bool [[HasParentRelationship - Actor|HasParentRelationship]](Actor ''akOther'')''' | ||
*Returns whether this actor has a parent relationship with the other actor. | *Returns whether this actor has a parent relationship with the other actor. | ||
''' | '''Bool [[HasPerk - Actor|HasPerk]](Perk ''akPerk'')''' | ||
*Checks to see if this actor has the given Perk | *Checks to see if this actor has the given Perk | ||
''' | '''Bool [[HasSpell - Actor|HasSpell]](Form ''akForm'')''' | ||
*Checks to see if this actor has the given Spell or Shout | *Checks to see if this actor has the given Spell or Shout | ||
''' | '''Bool [[IsAlarmed - Actor|IsAlarmed]]()''' | ||
*Obtains whether this actor is alarmed or not. | *Obtains whether this actor is alarmed or not. | ||
''' | '''Bool [[IsAlerted - Actor|IsAlerted]]()''' | ||
*Returns if this actor is alerted or not. | *Returns if this actor is alerted or not. | ||
''' | '''Bool [[IsAllowedToFly - Actor|IsAllowedToFly]]()''' | ||
*Is this actor allowed to fly? | *Is this actor allowed to fly? | ||
''' | '''Bool [[IsArrested - Actor|IsArrested]]()''' | ||
*Returns whether this actor is currently arrested or not. | *Returns whether this actor is currently arrested or not. | ||
''' | '''Bool [[IsArrestingTarget - Actor|IsArrestingTarget]]()''' | ||
*Is this actor currently arresting his target? Only valid on alerted guards. | *Is this actor currently arresting his target? Only valid on alerted guards. | ||
''' | '''Bool [[IsBeingRidden - Actor|IsBeingRidden]]()''' | ||
*Is this actor being ridden? | *Is this actor being ridden? | ||
''' | '''Bool [[IsBleedingOut - Actor|IsBleedingOut]]()''' | ||
*Is this actor currently bleeding out? | *Is this actor currently bleeding out? | ||
''' | '''Bool [[IsBribed - Actor|IsBribed]]()''' | ||
*Gets if this actor has been bribed by the player. | *Gets if this actor has been bribed by the player. | ||
''' | '''Bool [[IsChild - Actor|IsChild]]()''' | ||
*Is this actor a child? | *Is this actor a child? | ||
''' | '''Bool [[IsCommandedActor - Actor|IsCommandedActor]]()''' | ||
*Is this actor commanded by another? | *Is this actor commanded by another? | ||
''' | '''Bool [[IsDead - Actor|IsDead]]()''' | ||
*Obtains whether this actor is dead or not. | *Obtains whether this actor is dead or not. | ||
''' | '''Bool [[IsDetectedBy - Actor|IsDetectedBy]](Actor ''akOther'')''' | ||
*Is this actor detected by the other one? | *Is this actor detected by the other one? | ||
''' | '''Bool [[IsDoingFavor - Actor|IsDoingFavor]]()''' | ||
*Is this actor currently flagged as doing a favor for the player? | *Is this actor currently flagged as doing a favor for the player? | ||
''' | '''Bool [[IsEquipped - Actor|IsEquipped]](Form ''akItem'')''' | ||
*Is the specified object equipped on this actor? | *Is the specified object equipped on this actor? | ||
''' | '''Bool [[IsEssential - Actor|IsEssential]]()''' | ||
*Is this actor essential? | *Is this actor essential? | ||
''' | '''Bool [[IsFlying - Actor|IsFlying]]()''' | ||
*Is this actor currently flying? | *Is this actor currently flying? | ||
''' | '''Bool [[IsGhost - Actor|IsGhost]]()''' | ||
*Is this actor flagged as a ghost? | *Is this actor flagged as a ghost? | ||
''' | '''Bool [[IsGuard - Actor|IsGuard]]()''' | ||
*Obtains whether this actor is a guard or not. | *Obtains whether this actor is a guard or not. | ||
''' | '''Bool [[IsHostileToActor- Actor|IsHostileToActor-]](Actor ''akActor'')''' | ||
*Is this actor hostile to another actor? | *Is this actor hostile to another actor? | ||
''' | '''Bool [[IsInCombat - Actor|IsInCombat]]()''' | ||
*Obtains whether this actor is in combat or not. | *Obtains whether this actor is in combat or not. | ||
''' | '''Bool [[IsInFaction - Actor|IsInFaction]](Faction ''akFaction'')''' | ||
*Returns whether this actor is in the specified faction. | *Returns whether this actor is in the specified faction. | ||
''' | '''Bool [[IsInKillMove - Actor|IsInKillMove]]()''' | ||
*Returns whether this actor is in a kill move or not. | *Returns whether this actor is in a kill move or not. | ||
''' | '''Bool [[IsIntimidated - Actor|IsIntimidated]]()''' | ||
*Gets if this actor has been intimidated by the player. | *Gets if this actor has been intimidated by the player. | ||
''' | '''Bool [[IsOnMount - Actor|IsOnMount]]()''' | ||
*Is the actor on a mount? | *Is the actor on a mount? | ||
''' | '''Bool [[IsPlayersLastRiddenHorse - Actor|IsPlayersLastRiddenHorse]]()''' | ||
*Returns whether this actor is the horse the player last rode. | *Returns whether this actor is the horse the player last rode. | ||
''' | '''Bool [[IsPlayerTeammate - Actor|IsPlayerTeammate]]()''' | ||
*Returns whether this actor is currently a teammate of the player. | *Returns whether this actor is currently a teammate of the player. | ||
''' | '''Bool [[IsRunning - Actor|IsRunning]]()''' | ||
*Returns whether this actor is current running. | *Returns whether this actor is current running. | ||
''' | '''Bool [[IsSneaking - Actor|IsSneaking]]()''' | ||
*Is this actor currently sneaking? | *Is this actor currently sneaking? | ||
''' | '''Bool [[IsSprinting - Actor|IsSprinting]]()''' | ||
*Is this actor currently sprinting? | *Is this actor currently sprinting? | ||
''' | '''Bool [[IsTrespassing - Actor|IsTrespassing]]()''' | ||
*Returns whether this actor is currently trespassing or not. | *Returns whether this actor is currently trespassing or not. | ||
''' | '''Bool [[IsUnconscious - Actor|IsUnconscious]]()''' | ||
*Is this actor currently unconscious? | *Is this actor currently unconscious? | ||
''' | '''Bool [[IsWeaponDrawn - Actor|IsWeaponDrawn]]()''' | ||
*Does this actor have his equipped weapon and/or magic spell drawn? | *Does this actor have his equipped weapon and/or magic spell drawn? | ||
''' | '''[[KeepOffsetFromActor - Actor|KeepOffsetFromActor]](Actor ''arTarget'', Float ''afOffsetX'', Float ''afOffsetY'', Float ''afOffsetZ'', Float ''afOffsetAngleX'', Float ''afOffsetAngleY'', Float ''afOffsetAngleZ'', Float ''afCatchUpRadius'', Float ''afFollowRadius'')''' | ||
*Makes the actor switch to a state where it will try to keep a given offset from another actor | *Makes the actor switch to a state where it will try to keep a given offset from another actor | ||
''' | '''[[Kill - Actor|Kill]](Actor ''akKiller'')''' | ||
*Kills this actor with the specified actor as the guilty party. | *Kills this actor with the specified actor as the guilty party. | ||
''' | '''[[KillEssential - Actor|KillEssential]](Actor ''akKiller'')''' | ||
*Kills this actor, even if he is essential. | *Kills this actor, even if he is essential. | ||
''' | '''[[KillSilent - Actor|KillSilent]](Actor ''akKiller'')''' | ||
*Kills this actor without a kill event with the killer being the guilty party | *Kills this actor without a kill event with the killer being the guilty party | ||
''' | '''[[MakePlayerFriend - Actor|MakePlayerFriend]]()''' | ||
*Makes the actor a friend of the player. | *Makes the actor a friend of the player. | ||
''' | '''[[ModActorValue - Actor|ModActorValue]](String ''asValueName'', Float ''afAmount'')''' | ||
*Modifies the specified actor value by the specified amount. | *Modifies the specified actor value by the specified amount. | ||
''' | '''[[ModActorValue - Actor|ModAV]](String ''asValueName'', Float ''afAmount'')''' | ||
*Alias for ModActorValue(). | *Alias for ModActorValue]](). | ||
''' | '''[[ModFactionRank - Actor|ModFactionRank]](Faction ''akFaction'', Int ''aiMod'')''' | ||
*Modifies this actor's rank in the specified faction. | *Modifies this actor's rank in the specified faction. | ||
''' | '''[[MoveToPackageLocation - Actor|MoveToPackageLocation]]()''' | ||
*Pops this actor to the initial location for its current package. | *Pops this actor to the initial location for its current package. | ||
''' | '''[[OpenInventory - Actor|OpenInventory]](Bool ''abForceOpen'')''' | ||
*Opens this actor's inventory as if you were pick-pocketing them. | *Opens this actor's inventory as if you were pick-pocketing them. | ||
''' | '''Bool [[PathToReference - Actor|PathToReference]](ObjectReference ''aTarget'', Float ''afWalkRunPercent'')''' | ||
*Makes the actor path to the target reference at the speed given by afWalkRunercent. | *Makes the actor path to the target reference at the speed given by afWalkRunercent. | ||
''' | '''Bool [[PlayIdle - Actor|PlayIdle]](Idle ''akIdle'')''' | ||
*Plays the passed idle on this actor. | *Plays the passed idle on this actor. | ||
''' | '''Bool [[PlayIdleWithTarget - Actor|PlayIdleWithTarget]](Idle ''akIdle'', ObjectReference ''akTarget'')''' | ||
*Plays the passed idle on this actor, overriding the actor's current target with the one given. | *Plays the passed idle on this actor, overriding the actor's current target with the one given. | ||
''' | '''[[PlaySubGraphAnimation- Actor|PlaySubGraphAnimation-]](String ''asEventName'')''' | ||
*Sends the event passed to the actor's sub graphs. | *Sends the event passed to the actor's sub graphs. | ||
''' | '''[[RemoveFromFaction - Actor|RemoveFromFaction]](Faction ''akFaction'')''' | ||
*Removes this actor from the specified faction. | *Removes this actor from the specified faction. | ||
''' | '''[[RemoveFromAllFactions - Actor|RemoveFromAllFactions]]()''' | ||
*Removes this actor from all factions they are associated with. | *Removes this actor from all factions they are associated with. | ||
''' | '''[[RemovePerk - Actor|RemovePerk]](Perk ''akPerk'')''' | ||
*Removes the specified perk from this actor. | *Removes the specified perk from this actor. | ||
''' | '''Bool [[RemoveShout - Actor|RemoveShout]](Shout ''akShout'')''' | ||
*Removes the specified shout from this actor. | *Removes the specified shout from this actor. | ||
''' | '''Bool [[RemoveSpell - Actor|RemoveSpell]](Spell ''akSpell'')''' | ||
*Removes the specified spell from this actor. | *Removes the specified spell from this actor. | ||
''' | '''[[ResetHealthAndLimbs - Actor|ResetHealthAndLimbs]]()''' | ||
*Resets this actor's health and limb state. | *Resets this actor's health and limb state. | ||
''' | '''[[RestoreActorValue - Actor|RestoreActorValue]](String ''asValueName'', Float ''afAmount'')''' | ||
*Restores damage done to the specified actor value. | *Restores damage done to the specified actor value. | ||
''' | '''[[RestoreActorValue - Actor|RestoreAV]](String ''asValueName'', Float ''afAmount'')''' | ||
*Alias for RestoreActorValue(). | *Alias for RestoreActorValue(). | ||
''' | '''[[Resurrect - Actor|Resurrect]]()''' | ||
*Resurrects this actor. | *Resurrects this actor. | ||
''' | '''[[SendAssaultAlarm - Actor|SendAssaultAlarm]]()''' | ||
*Has this actor behave as if they were assaulted. | *Has this actor behave as if they were assaulted. | ||
''' | '''[[SendTrespassAlarm - Actor|SendTrespassAlarm]](Actor ''akCriminal'')''' | ||
*Has this actor behave as if they caught the criminal trespassing | *Has this actor behave as if they caught the criminal trespassing | ||
''' | '''[[SetActorValue - Actor|SetActorValue]](String ''asValueName'', Float ''afValue'')''' | ||
*Sets the specified actor value on the actor to the passed-in value. | *Sets the specified actor value on the actor to the passed-in value. | ||
''' | '''[[SetAlert - Actor|SetAlert]](Bool ''abAlerted'')''' | ||
*Flags this actor as currently alerted (or clears it) | *Flags this actor as currently alerted (or clears it) | ||
''' | '''[[SetAllowFlying - Actor|SetAllowFlying]](Bool ''abAllowed'')''' | ||
*Flags this actor as whether they are allowed to fly or not (lands them if they are flying and not allowed to) | *Flags this actor as whether they are allowed to fly or not (lands them if they are flying and not allowed to) | ||
''' | '''[[SetAllowFlyingEx - Actor|SetAllowFlyingEx]](Bool ''abAllowed'', Bool ''abAllowCrash'', Bool ''abAllowSearch'')''' | ||
*Sets whether this actor is allowed to fly or not. If not, and they are flying, will land the actor. | *Sets whether this actor is allowed to fly or not. If not, and they are flying, will land the actor. | ||
''' | '''[[SetAlpha - Actor|SetAlpha]](Float ''afTargetAlpha'', Bool ''abFade'')''' | ||
*Sets this actor's alpha - optionally fading to that value rather then popping. | *Sets this actor's alpha - optionally fading to that value rather then popping. | ||
''' | '''[[SetAttackActorOnSight - Actor|SetAttackActorOnSight]](Bool ''abAttackOnSight'')''' | ||
*Flags this actor to be attacked by all actors when detected. | *Flags this actor to be attacked by all actors when detected. | ||
''' | '''[[SetActorValue - Actor|SetAV]](String ''asValueName'', Float ''afValue'')''' | ||
*Alias for SetActorValue(). | *Alias for SetActorValue(). | ||
''' | '''[[SetBribed - Actor|SetBribed]](Bool ''abBribe'')''' | ||
*Sets if this actor is being bribed by the player. | *Sets if this actor is being bribed by the player. | ||
''' | '''[[SetCrimeFaction - Actor|SetCrimeFaction]](Faction ''akFaction'')''' | ||
*Sets the faction that this actor reports crimes to. | *Sets the faction that this actor reports crimes to. | ||
''' | '''[[SetCriticalStage - Actor|SetCriticalStage]](Int ''aiStage'')''' | ||
*Sets this actor's current critical stage (applying any related effects) | *Sets this actor's current critical stage (applying any related effects) | ||
''' | '''[[SetDoingFavor - Actor|SetDoingFavor]](Bool ''abDoingFavor'')''' | ||
*Flags this actor as doing a favor for the player. | *Flags this actor as doing a favor for the player. | ||
''' | '''[[SetDontMove - Actor|SetDontMove]](Bool ''abDontMove'')''' | ||
*Flags/unflags this actor as "don't move". | |||
'''[[SetExpressionOverride - Actor|SetExpressionOverride]](Int ''aiMood'', Int ''aiStrength'')''' | |||
*Sets an expression override on this actor. | *Sets an expression override on this actor. | ||
''' | '''[[SetEyeTexture - Actor|SetEyeTexture]](TextureSet ''akTexture'')''' | ||
*Forces a new eye texture on the actor. | *Forces a new eye texture on the actor. | ||
''' | '''[[SetFactionRank - Actor|SetFactionRank]](Faction ''akFaction'', Int ''aiRank'')''' | ||
*Sets this actor's rank in the specified faction, adding it to the faction if necessary. | *Sets this actor's rank in the specified faction, adding it to the faction if necessary. | ||
''' | '''[[SetForcedLandingMarker - Actor|SetForcedLandingMarker]](ObjectReference ''aMarker'')''' | ||
*Forces the landing marker for this actor to the passed-in one. | *Forces the landing marker for this actor to the passed-in one. | ||
''' | '''[[SetGhost - Actor|SetGhost]](Bool ''abIsGhost'')''' | ||
*Sets this actor as a ghost or not. | *Sets this actor as a ghost or not. | ||
''' | '''[[SetHeadTracking - Actor|SetHeadTracking]](Bool ''abEnable'')''' | ||
*Enables or disables this actor's head tracking. | *Enables or disables this actor's head tracking. | ||
''' | '''[[SetIntimidated - Actor|SetIntimidated]](Bool ''abIntimidate'')''' | ||
*Sets if this actor is being intimidated by the player. | *Sets if this actor is being intimidated by the player. | ||
''' | '''[[SetLookAt - Actor|SetLookAt]](ObjectReference ''akTarget'', Bool ''abPathingLookAt'')''' | ||
*Sets this actor's look at target, optionally using it for pathing as well. | *Sets this actor's look at target, optionally using it for pathing as well. | ||
''' | '''[[SetNoBleedoutRecovery - Actor|SetNoBleedoutRecovery]](Bool ''abAllowed'')''' | ||
*Sets or clears the "no bleedout recovery" flag on this actor. | *Sets or clears the "no bleedout recovery" flag on this actor. | ||
''' | '''[[SetNotShowOnStealthMeter - Actor|SetNotShowOnStealthMeter]](Bool ''abNotShow'')''' | ||
*Sets this actor to not effect the detection level on the stealth meter if he is not hostile to the player | *Sets this actor to not effect the detection level on the stealth meter if he is not hostile to the player | ||
''' | '''[[SetOutfit - Actor|SetOutfit]](Outfit ''akOutfit'', Bool ''abSleepOutfit'')''' | ||
*Change the default or sleep outfit and queue the models to be worn now. | *Change the default or sleep outfit and queue the models to be worn now. | ||
''' | '''[[SetPlayerControls - Actor|SetPlayerControls]](Bool ''abControls'')''' | ||
*Set/reset whether player input being sent to the actor. | *Set/reset whether player input being sent to the actor. | ||
''' | '''[[SetPlayerResistingArrest - Actor|SetPlayerResistingArrest]]()''' | ||
*Flags the player as resisting arrest from this actor's faction. | *Flags the player as resisting arrest from this actor's faction. | ||
''' | '''[[SetPlayerTeammate - Actor|SetPlayerTeammate]](Bool ''abTeammate'', Bool ''abCanDoFavor'')''' | ||
*Sets (or clears) this actor as a teammate of the player and if the teammate can do favors. | *Sets (or clears) this actor as a teammate of the player and if the teammate can do favors. | ||
''' | '''[[SetRace - Actor|SetRace]](Race ''akRace'')''' | ||
*Sets the actor's race | *Sets the actor's race | ||
''' | '''[[SetRelationshipRank - Actor|SetRelationshipRank]](Actor ''akOther'', Int ''aiRank'')''' | ||
*Sets the relationship rank between this actor and another. | *Sets the relationship rank between this actor and another. | ||
''' | '''[[SetRestrained - Actor|SetRestrained]](Bool ''abRestrained'')''' | ||
*Flags this actor as restrained or not. | *Flags this actor as restrained or not. | ||
''' | '''[[SetSubGraphFloatVariable - Actor|SetSubGraphFloatVariable]](String ''asVariableName'', Float ''afValue'')''' | ||
*Set a variable on all of an actor's sub graphs. | *Set a variable on all of an actor's sub graphs. | ||
''' | '''[[SetUnconscious - Actor|SetUnconscious]](Bool ''abIsUnconscious'')''' | ||
*Sets this actor as unconscious or not. | *Sets this actor as unconscious or not. | ||
''' | '''[[SetVehicle - Actor|SetVehicle]](ObjectReference ''akVehicle'')''' | ||
*Attaches or detaches this actor from a vehicle. | *Attaches or detaches this actor from a vehicle. | ||
''' | '''[[SetVoiceRecoveryTime - Actor|SetVoiceRecoveryTime]](Float ''afTime'')''' | ||
*Sets the voice recovery time on the actor. | *Sets the voice recovery time on the actor. | ||
''' | '''[[ShowBarterMenu - Actor|ShowBarterMenu]]()''' | ||
*Shows the barter menu for this actor. | *Shows the barter menu for this actor. | ||
''' | '''[[ShowGiftMenu - Actor|ShowGiftMenu]]()''' | ||
*Shows the give/take menu for this actor. | *Shows the give/take menu for this actor. | ||
''' | '''[[StartCannibal - Actor|StartCannibal]](Actor ''akTarget'')''' | ||
*Has the actor feed on a dead actor. | *Has the actor feed on a dead actor. | ||
''' | '''[[StartCombat - Actor|StartCombat]](Actor ''akTarget'')''' | ||
*Attempts to initiate combat with the other actor. | *Attempts to initiate combat with the other actor. | ||
''' | '''[[StartDeferredKill - Actor|StartDeferredKill]]()''' | ||
*Puts the actor into a Deferred Kill state | *Puts the actor into a Deferred Kill state | ||
''' | '''[[StartSneaking - Actor|StartSneaking]]()''' | ||
*Forces this actor to start sneaking. | *Forces this actor to start sneaking. | ||
''' | '''[[StartVampireFeed - Actor|StartVampireFeed]](Actor ''akTarget'')''' | ||
*Has the actor vampire feed on a sleeping actor | *Has the actor vampire feed on a sleeping actor | ||
''' | '''[[StopCombat - Actor|StopCombat]]()''' | ||
*Removes this actor from combat. | *Removes this actor from combat. | ||
''' | '''[[StopCombatAlarm - Actor|StopCombatAlarm]]()''' | ||
*Stops all combat and alarms against this actor. | *Stops all combat and alarms against this actor. | ||
''' | '''Bool [[TrapSoul - Actor|TrapSoul]](Actor ''akTarget'')''' | ||
*Attempts to soul trap the target actor - and returns if it succeeded or not. | *Attempts to soul trap the target actor - and returns if it succeeded or not. | ||
''' | '''[[UnequipAll - Actor|UnequipAll]]()''' | ||
*Unequips all items from this actor. | *Unequips all items from this actor. | ||
''' | '''[[UnequipItem - Actor|UnequipItem]](Form ''akItem'', Bool ''abPreventEquip'', Bool ''abSilent'')''' | ||
*Unequips an item from this actor. | *Unequips an item from this actor. | ||
''' | '''[[UnequipItemSlot - Actor|UnequipItemSlot]](Int ''aiSlot'')''' | ||
*Forces this actor to unequip all armor on the given slot. | *Forces this actor to unequip all armor on the given slot. | ||
''' | '''[[UnequipShout - Actor|UnequipShout]](Shout ''akShout'')''' | ||
*Unequips the specified shout from this actor. | *Unequips the specified shout from this actor. | ||
''' | '''[[UnequipSpell - Actor|UnequipSpell]](Spell ''akSpell'', Int ''aiSource'')''' | ||
*Unequips the specified spell from the specified source on this actor. | *Unequips the specified spell from the specified source on this actor. | ||
''' | '''[[UnlockOwnedDoorsInCell - Actor|UnlockOwnedDoorsInCell]]()''' | ||
*Has this actor unlock any doors he owns in the cell he's currently in (if it is an interior). | *Has this actor unlock any doors he owns in the cell he's currently in (if it is an interior). | ||
''' | '''Bool [[WillIntimidateSucceed - Actor|WillIntimidateSucceed]]()''' | ||
*Returns whether an intimidation attempt by the player against this actor will succeed or not. | *Returns whether an intimidation attempt by the player against this actor will succeed or not. | ||
''' | '''Bool [[WornHasKeyword - Actor|WornHasKeyword]](Keyword ''akKeyword'')''' | ||
*Returns whether or not this actor is wearing anything with the specified keyword. | *Returns whether or not this actor is wearing anything with the specified keyword. | ||
== Special Edition Exclusive Functions == | |||
'''Bool [[IsOverEncumbered - Actor|IsOverEncumbered]]()''' | |||
*Is the actor currently over-encumbered? | |||
'''Float [[GetActorValueMax - Actor|GetActorValueMax]](String ''asValueName'')''' | |||
*Retrieves the specified actor value's maximum value - taking into account buffs and debuffs. | |||
'''Float [[GetActorValueMax - Actor|GetAVMax]](String ''asValueName'')''' | |||
*Alias for GetActorValueMax(). | |||
'''Armor [[GetEquippedArmorInSlot - Actor|GetEquippedArmorInSlot]](Int ''aiSlot'')''' | |||
*Obtain the armor currently equipped in the specified slot. | |||
'''Float [[GetWarmthRating - Actor|GetWarmthRating]]()''' | |||
*Obtains the total "warmth rating" for the actor | |||
'''[[SendLycanthropyStateChanged - Actor|SendLycanthropyStateChanged]](Bool ''abIsWerewolf'')''' | |||
*Tells anyone who cares that the lycanthropy state of this actor has changed | |||
'''[[SendVampirismStateChanged - Actor|SendVampirismStateChanged]](bool ''abIsVampire'')''' | |||
*Tells anyone who cares that the vampirism state of this actor has changed | |||
== SKSE Member Functions == | == SKSE Member Functions == | ||
'''Form | |||
'''Form [[GetWornForm - Actor|GetWornForm]](Int ''slotMask'')''' | |||
*Returns the form of the item worn with the specified slotMask. | *Returns the form of the item worn with the specified slotMask. | ||
'''Int [[GetWornFormId - Actor|GetWornFormId]](Int ''slotMask'')''' | |||
*Returns the formID of the item worn with the specified slotMask. | |||
'''Form [[GetEquippedObject - Actor|GetEquippedObject]](Int ''location'')''' | |||
*Returns the object currently equipped in the specified location. | |||
'''Int [[GetEquippedItemId - Actor|GetEquippedItemId]](Int ''location'')''' | |||
*Returns the FormID of the currently equipped object in the specified location. | |||
'''Int [[GetSpellCount - Actor|GetSpellCount]]()''' | |||
*Returns the number of added spells for the actor. | |||
'''Spell [[GetNthSpell - Actor|GetNthSpell]](Int ''n'')''' | |||
*Returns the specified added spell for the actor. | |||
'''[[QueueNiNodeUpdate - Actor|QueueNiNodeUpdate]]()''' | |||
*Updates modifications linked to the actor. | |||
'''[[RegenerateHead - Actor|RegenerateHead]]()''' | |||
*Updates an Actors head mesh. | |||
'''[[EquipItemEx - Actor|EquipItemEx]](Form ''item'', Int ''equipSlot'', Bool ''preventUnequip'', Bool ''equipSound'')''' | |||
*Forces this actor to equip the first item in the specified form's extralist to the specified slot. | |||
'''[[EquipItemById - Actor|EquipItemById]](Form ''item'', Int ''itemId'', Int ''equipSlot'', Bool ''preventUnequip'', Bool ''equipSound'')''' | |||
*Forces this actor to equip the specified item to the specified slot. | |||
'''[[UnequipItemEx - Actor|UnequipItemEx]](Form ''item'', Int ''equipSlot'', Bool ''preventEquip'')''' | |||
*Force unequips the specified item at the specified slot. | |||
'''[[ChangeHeadPart - Actor|ChangeHeadPart]](HeadPart ''hPart'')''' | |||
*Adds a headpart, if the type exists it will replace. | |||
'''[[ReplaceHeadPart - Actor|ReplaceHeadPart]](HeadPart ''oPart'', HeadPart ''newPart'')''' | |||
*Replaces a headpart on the loaded mesh. This does not affect the ActorBase, both old an new headparts must exist and be of the same type. | |||
'''[[UpdateWeight - Actor|UpdateWeight]](Float ''neckDelta'')''' | |||
*Visually updates the actors weight. | |||
'''Bool [[IsAIEnabled - Actor|IsAIEnabled]]()''' | |||
*Returns whether the actors AI is enabled | |||
'''Bool [[IsSwimming - Actor|IsSwimming]]()''' | |||
*Returns whether the actor is currently swimming. | |||
'''[[SheatheWeapon - Actor|SheatheWeapon]]()''' | |||
*Sheathes the actors weapon. | |||
'''Faction[] [[GetFactions - Actor| GetFactions]](int ''minRank'', int ''maxRank'')''' | |||
*Returns all factions with the specified min and max ranks (-128 to 127) | |||
== Events == | == Events == | ||
''' | '''[[OnCombatStateChanged - Actor|OnCombatStateChanged]](Actor ''akTarget'', Int ''aeCombatState'')''' | ||
*Sent when this actor's combat state changes. | *Sent when this actor's combat state changes. | ||
''' | '''[[OnDeath - Actor|OnDeath]](Actor ''akKiller'')''' | ||
*Event received when this actor dies. | *Event received when this actor dies. | ||
''' | '''[[OnDying - Actor|OnDying]](Actor ''akKiller'')''' | ||
*Event received when this actor begins to die. | *Event received when this actor begins to die. | ||
''' | '''[[OnEnterBleedout - Actor|OnEnterBleedout]]()''' | ||
*Event received when this object enters bleedout. | *Event received when this object enters bleedout. | ||
''' | '''[[OnGetUp - Actor|OnGetUp]](ObjectReference ''akFurniture'')''' | ||
*Event received when this actor gets up off the specified furniture. | *Event received when this actor gets up off the specified furniture. | ||
''' | '''[[OnLocationChange - Actor|OnLocationChange]](Location ''akOldLoc'', Location ''akNewLoc'')''' | ||
*Event received when the actor moves from one location to another. | *Event received when the actor moves from one location to another. | ||
''' | '''[[OnObjectEquipped - Actor|OnObjectEquipped]](Form ''akBaseObject'', ObjectReference ''akReference'')''' | ||
*Event received when this actor equips an object. | *Event received when this actor equips an object. | ||
''' | '''[[OnObjectUnequipped - Actor|OnObjectUnequipped]](Form ''akBaseObject'', ObjectReference ''akReference'')''' | ||
*Event received when this actor unequips an object. | *Event received when this actor unequips an object. | ||
''' | '''[[OnPackageChange - Actor|OnPackageChange]](Package ''akOldPackage'')''' | ||
*Event received when this actor changes away from a package. | *Event received when this actor changes away from a package. | ||
''' | '''[[OnPackageEnd - Actor|OnPackageEnd]](Package ''akOldPackage'')''' | ||
*Event received when this actor ends a package. | *Event received when this actor ends a package. | ||
''' | '''[[OnPackageStart - Actor|OnPackageStart]](Package ''akNewPackage'')''' | ||
*Event received when this actor starts running a new package. | *Event received when this actor starts running a new package. | ||
''' | '''[[OnPlayerBowShot - Actor|OnPlayerBowShot]](Weapon ''akWeapon'', Ammo ''akAmmo'', Float ''afPower'', Bool ''abSunGazing'')''' | ||
*Event called when the actor is the player, and the player has fired a bow. | *Event called when the actor is the player, and the player has fired a bow. | ||
''' | '''[[OnPlayerLoadGame - Actor|OnPlayerLoadGame]]()''' | ||
*Event received by the player actor when a saved game is loaded. | *Event received by the player actor when a saved game is loaded. | ||
''' | '''[[OnRaceSwitchComplete - Actor|OnRaceSwitchComplete]]()''' | ||
*Event received when this actor finishes switching races. | *Event received when this actor finishes switching races. | ||
''' | '''[[OnSit - Actor|OnSit]](ObjectReference ''akFurniture'')''' | ||
*Event received when this actor sits on the specified furniture. | *Event received when this actor sits on the specified furniture. | ||
== Special Edition Exclusive Events == | |||
'''[[OnLycanthropyStateChanged - Actor|OnLycanthropyStateChanged]](Bool ''abIsWerewolf'')''' | |||
*Event received when the lycanthropy state of this actor changes | |||
'''[[OnPlayerFastTravelEnd - Actor|OnPlayerFastTravelEnd]](Float ''afTravelGameTimeHours'')''' | |||
*Event received when the player finishes fast travel. | |||
'''[[OnVampirismStateChanged - Actor|OnVampirismStateChanged]](bool ''abIsVampire'')''' | |||
*Event received when the vampirism state of this actor changes | |||
'''[[OnVampireFeed - Actor|OnVampireFeed]](Actor ''akTarget'')''' | |||
*Event received when this actor feeds on another, as a vampire | |||
== Notes == | == Notes == | ||
* You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled. | * You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled. | ||
** There is a workaround | ** There is a workaround for this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the FXDragonBloodDamageScript handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, this script is attached to AbFXDragonBloodDamage, which is an effect on the AbDragonBloodFX spell. That's then assigned as a special racial ability of the DragonRace. You can see a similar example in how the WispMothers work, too. |
Latest revision as of 14:22, 24 February 2024
Extends: ObjectReference Script
Script for the manipulation of actor instances.
Definition[edit | edit source]
ScriptName Actor extends ObjectReference
Properties[edit | edit source]
None
Global Functions[edit | edit source]
None
Member Functions[edit | edit source]
AddPerk(Perk akPerk)
- Adds the specified perk to this actor.
Bool AddShout(Shout akShout)
- Adds the specified shout to this actor.
Bool AddSpell(Spell akSpell, Bool abVerbose)
- Adds the specified spell to this actor.
AddToFaction(Faction akFaction)
- Adds the actor to the specified faction at rank 0. If the Actor is already in the given faction, this function does nothing.
AllowBleedoutDialogue(Bool abCanTalk)
- Flags this actor as able to speak to the player when he is in bleed out and is essential down
AllowPCDialogue(Bool abTalk)
- Enables or disables the player's ability to talk to this actor.
AttachAshPile(Form akAshPileBase)
- Attaches an "ash pile" to this actor using the passed-in form (or leveled item list) as a base.
Bool CanFlyHere()
- Can this actor fly here?
- Clears this actor's arrested state.
- Clears any expression override on this actor.
- Clears any arrow 3d on the actor.
- Clears any forced landing marker on this actor.
- Clears any keep offset from this actor.
- Clears this actor's script-forced look at target.
DamageActorValue(String asValueName, Float afDamage)
- Damages the specified actor value by the specified amount.
DamageAV(String asValueName, Float afDamage)
- Alias for DamageActorValue().
Bool Dismount()
- Forces the actor to dismount.
- Dispel all spell from this actor
Bool DispelSpell(Spell akSpell)
- Dispel a spell from this actor
DoCombatSpellApply(Spell akSpell, ObjectReference akTarget)
- Apply a spell to a target in combat
- Forces this actor to draw his weapon
EnableAI(Bool abEnable)
- Enables or disables this actor's AI.
- Removes the actor from a Deferred Kill state.
EquipItem(Form akItem, Bool abPreventRemoval, Bool abSilent)
- Equips the specified item on this actor.
EquipShout(Shout akShout)
- Forces this actor to equip this shout.
EquipSpell(Spell akSpell, Int aiSource)
- Forces this actor to equip thes spell, in the specified source.
- Forces the AI to re-evaluate its package stack.
ForceActorValue(String asValueName, Float afNewValue)
- Forces the specified actor value to the specified value.
ForceAV(String asValueName, Float afNewValue)
- Alias for ForceActorValue().
ActorBase GetActorBase()
- Returns the base actor object for this actor.
Float GetActorValue(String asValueName)
- Retrieves the specified actor value from the actor.
Float GetActorValuePercentage(String asValueName)
- Retrieves the specified actor value from the actor as a percentage of its maximum value. (From 0 to 1)
Float GetAV(String asValueName)
- Alias for GetActorValue().
Float GetAVPercentage(String asValueName)
- Alias for GetActorValuePercentage().
Float GetBaseActorValue(String asValueName)
- Gets the base value of the specified actor value.
Float GetBaseAV(String asValueName)
- Alias for GetBaseActorValue().
Int GetBribeAmount()
- Returns the amount of gold required to bribe this actor.
Faction GetCrimeFaction()
- Obtains this actor's crime faction.
Int GetCombatState()
- Obtains this actor's current combat state.
Actor GetCombatTarget()
- Obtains this actor's current combat target.
Package GetCurrentPackage()
- Obtains the current package this actor's AI is running.
Actor GetDialogueTarget()
- Obtains the actor's current dialogue target
Int GetEquippedItemType(Int aiHand)
- Obtains the type of item equipped in the specified hand.
Armor GetEquippedShield()
- Obtains the currently equipped shield on this actor.
Shout GetEquippedShout()
- Obtains the currently equipped shout on this actor.
Spell GetEquippedSpell(Int aiSource)
- Obtains the currently equipped spell in the specified source on this actor.
Weapon GetEquippedWeapon(Bool abLeftHand)
- Obtains the currently equipped weapon on this actor.
Int GetFactionRank(Faction akFaction)
- Retrieves this actor's rank in the specified faction.
Int GetFactionReaction(Actor akOther)
- Obtains this actor's faction-based reaction to the other actor.
Int GetFlyingState()
- Obtains this actor's current flying state.
ObjectReference GetForcedLandingMarker()
- Obtains the landing marker the actor is forced to land at (if any).
Int GetGoldAmount()
- Gets the amount of gold this actor has on his person.
Int GetHighestRelationshipRank()
- Gets this actor's highest relationship rank.
Actor GetKiller()
- Gets this actor's killer. Returns None if this actor isn't dead.
Int GetLevel()
- Gets this actor's current level.
ActorBase GetLeveledActorBase()
- Returns a leveled actor's "temporary" base object.
Float GetLightLevel()
- Returns this actor's current light level
Int GetLowestRelationshipRank()
- Gets this actor's lowest relationship rank.
Bool GetNoBleedoutRecovery()
- Gets whether this actor can recover from bleedout or not.
Bool GetPlayerControls()
- Queries whether this actor receives player input
Race GetRace()
- Returns this actor's race.
Int GetRelationshipRank(Actor akOther)
- Retrieves the relationship rank between this actor and another.
Int GetSitState()
- Obtains this actor's sit state.
Int GetSleepState()
- Obtains this actor's sleep state.
Float GetVoiceRecoveryTime()
- Gets the voice recovery time from the actor.
Bool HasAssociation(AssociationType akAssociation, Actor akOther)
- Returns whether this actor has the specified association with the other actor.
Bool HasFamilyRelationship(Actor akOther)
- Returns whether this actor has a family relationship with the other actor.
Bool HasLOS(ObjectReference akOther)
- Checks to see if this actor has line-of-sight to another. (Only the player can do a LOS check to a non-actor)
Bool HasMagicEffect(MagicEffect akEffect)
- Checks to see if this actor is currently being affected by the given Magic Effect
Bool HasMagicEffectWithKeyword(Keyword akKeyword)
- Checks to see if this actor is currently being affected by a Magic Effect with the given Keyword
Bool HasParentRelationship(Actor akOther)
- Returns whether this actor has a parent relationship with the other actor.
Bool HasPerk(Perk akPerk)
- Checks to see if this actor has the given Perk
Bool HasSpell(Form akForm)
- Checks to see if this actor has the given Spell or Shout
Bool IsAlarmed()
- Obtains whether this actor is alarmed or not.
Bool IsAlerted()
- Returns if this actor is alerted or not.
Bool IsAllowedToFly()
- Is this actor allowed to fly?
Bool IsArrested()
- Returns whether this actor is currently arrested or not.
Bool IsArrestingTarget()
- Is this actor currently arresting his target? Only valid on alerted guards.
Bool IsBeingRidden()
- Is this actor being ridden?
Bool IsBleedingOut()
- Is this actor currently bleeding out?
Bool IsBribed()
- Gets if this actor has been bribed by the player.
Bool IsChild()
- Is this actor a child?
Bool IsCommandedActor()
- Is this actor commanded by another?
Bool IsDead()
- Obtains whether this actor is dead or not.
Bool IsDetectedBy(Actor akOther)
- Is this actor detected by the other one?
Bool IsDoingFavor()
- Is this actor currently flagged as doing a favor for the player?
Bool IsEquipped(Form akItem)
- Is the specified object equipped on this actor?
Bool IsEssential()
- Is this actor essential?
Bool IsFlying()
- Is this actor currently flying?
Bool IsGhost()
- Is this actor flagged as a ghost?
Bool IsGuard()
- Obtains whether this actor is a guard or not.
Bool IsHostileToActor-(Actor akActor)
- Is this actor hostile to another actor?
Bool IsInCombat()
- Obtains whether this actor is in combat or not.
Bool IsInFaction(Faction akFaction)
- Returns whether this actor is in the specified faction.
Bool IsInKillMove()
- Returns whether this actor is in a kill move or not.
Bool IsIntimidated()
- Gets if this actor has been intimidated by the player.
Bool IsOnMount()
- Is the actor on a mount?
Bool IsPlayersLastRiddenHorse()
- Returns whether this actor is the horse the player last rode.
Bool IsPlayerTeammate()
- Returns whether this actor is currently a teammate of the player.
Bool IsRunning()
- Returns whether this actor is current running.
Bool IsSneaking()
- Is this actor currently sneaking?
Bool IsSprinting()
- Is this actor currently sprinting?
Bool IsTrespassing()
- Returns whether this actor is currently trespassing or not.
Bool IsUnconscious()
- Is this actor currently unconscious?
Bool IsWeaponDrawn()
- Does this actor have his equipped weapon and/or magic spell drawn?
KeepOffsetFromActor(Actor arTarget, Float afOffsetX, Float afOffsetY, Float afOffsetZ, Float afOffsetAngleX, Float afOffsetAngleY, Float afOffsetAngleZ, Float afCatchUpRadius, Float afFollowRadius)
- Makes the actor switch to a state where it will try to keep a given offset from another actor
Kill(Actor akKiller)
- Kills this actor with the specified actor as the guilty party.
KillEssential(Actor akKiller)
- Kills this actor, even if he is essential.
KillSilent(Actor akKiller)
- Kills this actor without a kill event with the killer being the guilty party
- Makes the actor a friend of the player.
ModActorValue(String asValueName, Float afAmount)
- Modifies the specified actor value by the specified amount.
ModAV(String asValueName, Float afAmount)
- Alias for ModActorValue]]().
ModFactionRank(Faction akFaction, Int aiMod)
- Modifies this actor's rank in the specified faction.
- Pops this actor to the initial location for its current package.
OpenInventory(Bool abForceOpen)
- Opens this actor's inventory as if you were pick-pocketing them.
Bool PathToReference(ObjectReference aTarget, Float afWalkRunPercent)
- Makes the actor path to the target reference at the speed given by afWalkRunercent.
Bool PlayIdle(Idle akIdle)
- Plays the passed idle on this actor.
Bool PlayIdleWithTarget(Idle akIdle, ObjectReference akTarget)
- Plays the passed idle on this actor, overriding the actor's current target with the one given.
PlaySubGraphAnimation-(String asEventName)
- Sends the event passed to the actor's sub graphs.
RemoveFromFaction(Faction akFaction)
- Removes this actor from the specified faction.
- Removes this actor from all factions they are associated with.
RemovePerk(Perk akPerk)
- Removes the specified perk from this actor.
Bool RemoveShout(Shout akShout)
- Removes the specified shout from this actor.
Bool RemoveSpell(Spell akSpell)
- Removes the specified spell from this actor.
- Resets this actor's health and limb state.
RestoreActorValue(String asValueName, Float afAmount)
- Restores damage done to the specified actor value.
RestoreAV(String asValueName, Float afAmount)
- Alias for RestoreActorValue().
- Resurrects this actor.
- Has this actor behave as if they were assaulted.
SendTrespassAlarm(Actor akCriminal)
- Has this actor behave as if they caught the criminal trespassing
SetActorValue(String asValueName, Float afValue)
- Sets the specified actor value on the actor to the passed-in value.
SetAlert(Bool abAlerted)
- Flags this actor as currently alerted (or clears it)
SetAllowFlying(Bool abAllowed)
- Flags this actor as whether they are allowed to fly or not (lands them if they are flying and not allowed to)
SetAllowFlyingEx(Bool abAllowed, Bool abAllowCrash, Bool abAllowSearch)
- Sets whether this actor is allowed to fly or not. If not, and they are flying, will land the actor.
SetAlpha(Float afTargetAlpha, Bool abFade)
- Sets this actor's alpha - optionally fading to that value rather then popping.
SetAttackActorOnSight(Bool abAttackOnSight)
- Flags this actor to be attacked by all actors when detected.
SetAV(String asValueName, Float afValue)
- Alias for SetActorValue().
SetBribed(Bool abBribe)
- Sets if this actor is being bribed by the player.
SetCrimeFaction(Faction akFaction)
- Sets the faction that this actor reports crimes to.
SetCriticalStage(Int aiStage)
- Sets this actor's current critical stage (applying any related effects)
SetDoingFavor(Bool abDoingFavor)
- Flags this actor as doing a favor for the player.
SetDontMove(Bool abDontMove)
- Flags/unflags this actor as "don't move".
SetExpressionOverride(Int aiMood, Int aiStrength)
- Sets an expression override on this actor.
SetEyeTexture(TextureSet akTexture)
- Forces a new eye texture on the actor.
SetFactionRank(Faction akFaction, Int aiRank)
- Sets this actor's rank in the specified faction, adding it to the faction if necessary.
SetForcedLandingMarker(ObjectReference aMarker)
- Forces the landing marker for this actor to the passed-in one.
SetGhost(Bool abIsGhost)
- Sets this actor as a ghost or not.
SetHeadTracking(Bool abEnable)
- Enables or disables this actor's head tracking.
SetIntimidated(Bool abIntimidate)
- Sets if this actor is being intimidated by the player.
SetLookAt(ObjectReference akTarget, Bool abPathingLookAt)
- Sets this actor's look at target, optionally using it for pathing as well.
SetNoBleedoutRecovery(Bool abAllowed)
- Sets or clears the "no bleedout recovery" flag on this actor.
SetNotShowOnStealthMeter(Bool abNotShow)
- Sets this actor to not effect the detection level on the stealth meter if he is not hostile to the player
SetOutfit(Outfit akOutfit, Bool abSleepOutfit)
- Change the default or sleep outfit and queue the models to be worn now.
SetPlayerControls(Bool abControls)
- Set/reset whether player input being sent to the actor.
- Flags the player as resisting arrest from this actor's faction.
SetPlayerTeammate(Bool abTeammate, Bool abCanDoFavor)
- Sets (or clears) this actor as a teammate of the player and if the teammate can do favors.
SetRace(Race akRace)
- Sets the actor's race
SetRelationshipRank(Actor akOther, Int aiRank)
- Sets the relationship rank between this actor and another.
SetRestrained(Bool abRestrained)
- Flags this actor as restrained or not.
SetSubGraphFloatVariable(String asVariableName, Float afValue)
- Set a variable on all of an actor's sub graphs.
SetUnconscious(Bool abIsUnconscious)
- Sets this actor as unconscious or not.
SetVehicle(ObjectReference akVehicle)
- Attaches or detaches this actor from a vehicle.
SetVoiceRecoveryTime(Float afTime)
- Sets the voice recovery time on the actor.
- Shows the barter menu for this actor.
- Shows the give/take menu for this actor.
StartCannibal(Actor akTarget)
- Has the actor feed on a dead actor.
StartCombat(Actor akTarget)
- Attempts to initiate combat with the other actor.
- Puts the actor into a Deferred Kill state
- Forces this actor to start sneaking.
StartVampireFeed(Actor akTarget)
- Has the actor vampire feed on a sleeping actor
- Removes this actor from combat.
- Stops all combat and alarms against this actor.
Bool TrapSoul(Actor akTarget)
- Attempts to soul trap the target actor - and returns if it succeeded or not.
- Unequips all items from this actor.
UnequipItem(Form akItem, Bool abPreventEquip, Bool abSilent)
- Unequips an item from this actor.
UnequipItemSlot(Int aiSlot)
- Forces this actor to unequip all armor on the given slot.
UnequipShout(Shout akShout)
- Unequips the specified shout from this actor.
UnequipSpell(Spell akSpell, Int aiSource)
- Unequips the specified spell from the specified source on this actor.
- Has this actor unlock any doors he owns in the cell he's currently in (if it is an interior).
Bool WillIntimidateSucceed()
- Returns whether an intimidation attempt by the player against this actor will succeed or not.
Bool WornHasKeyword(Keyword akKeyword)
- Returns whether or not this actor is wearing anything with the specified keyword.
Special Edition Exclusive Functions[edit | edit source]
Bool IsOverEncumbered()
- Is the actor currently over-encumbered?
Float GetActorValueMax(String asValueName)
- Retrieves the specified actor value's maximum value - taking into account buffs and debuffs.
Float GetAVMax(String asValueName)
- Alias for GetActorValueMax().
Armor GetEquippedArmorInSlot(Int aiSlot)
- Obtain the armor currently equipped in the specified slot.
Float GetWarmthRating()
- Obtains the total "warmth rating" for the actor
SendLycanthropyStateChanged(Bool abIsWerewolf)
- Tells anyone who cares that the lycanthropy state of this actor has changed
SendVampirismStateChanged(bool abIsVampire)
- Tells anyone who cares that the vampirism state of this actor has changed
SKSE Member Functions[edit | edit source]
Form GetWornForm(Int slotMask)
- Returns the form of the item worn with the specified slotMask.
Int GetWornFormId(Int slotMask)
- Returns the formID of the item worn with the specified slotMask.
Form GetEquippedObject(Int location)
- Returns the object currently equipped in the specified location.
Int GetEquippedItemId(Int location)
- Returns the FormID of the currently equipped object in the specified location.
Int GetSpellCount()
- Returns the number of added spells for the actor.
Spell GetNthSpell(Int n)
- Returns the specified added spell for the actor.
- Updates modifications linked to the actor.
- Updates an Actors head mesh.
EquipItemEx(Form item, Int equipSlot, Bool preventUnequip, Bool equipSound)
- Forces this actor to equip the first item in the specified form's extralist to the specified slot.
EquipItemById(Form item, Int itemId, Int equipSlot, Bool preventUnequip, Bool equipSound)
- Forces this actor to equip the specified item to the specified slot.
UnequipItemEx(Form item, Int equipSlot, Bool preventEquip)
- Force unequips the specified item at the specified slot.
ChangeHeadPart(HeadPart hPart)
- Adds a headpart, if the type exists it will replace.
ReplaceHeadPart(HeadPart oPart, HeadPart newPart)
- Replaces a headpart on the loaded mesh. This does not affect the ActorBase, both old an new headparts must exist and be of the same type.
UpdateWeight(Float neckDelta)
- Visually updates the actors weight.
Bool IsAIEnabled()
- Returns whether the actors AI is enabled
Bool IsSwimming()
- Returns whether the actor is currently swimming.
- Sheathes the actors weapon.
Faction[] GetFactions(int minRank, int maxRank)
- Returns all factions with the specified min and max ranks (-128 to 127)
Events[edit | edit source]
OnCombatStateChanged(Actor akTarget, Int aeCombatState)
- Sent when this actor's combat state changes.
OnDeath(Actor akKiller)
- Event received when this actor dies.
OnDying(Actor akKiller)
- Event received when this actor begins to die.
- Event received when this object enters bleedout.
OnGetUp(ObjectReference akFurniture)
- Event received when this actor gets up off the specified furniture.
OnLocationChange(Location akOldLoc, Location akNewLoc)
- Event received when the actor moves from one location to another.
OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
- Event received when this actor equips an object.
OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)
- Event received when this actor unequips an object.
OnPackageChange(Package akOldPackage)
- Event received when this actor changes away from a package.
OnPackageEnd(Package akOldPackage)
- Event received when this actor ends a package.
OnPackageStart(Package akNewPackage)
- Event received when this actor starts running a new package.
OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, Float afPower, Bool abSunGazing)
- Event called when the actor is the player, and the player has fired a bow.
- Event received by the player actor when a saved game is loaded.
- Event received when this actor finishes switching races.
OnSit(ObjectReference akFurniture)
- Event received when this actor sits on the specified furniture.
Special Edition Exclusive Events[edit | edit source]
OnLycanthropyStateChanged(Bool abIsWerewolf)
- Event received when the lycanthropy state of this actor changes
OnPlayerFastTravelEnd(Float afTravelGameTimeHours)
- Event received when the player finishes fast travel.
OnVampirismStateChanged(bool abIsVampire)
- Event received when the vampirism state of this actor changes
OnVampireFeed(Actor akTarget)
- Event received when this actor feeds on another, as a vampire
Notes[edit | edit source]
- You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled.
- There is a workaround for this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the FXDragonBloodDamageScript handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, this script is attached to AbFXDragonBloodDamage, which is an effect on the AbDragonBloodFX spell. That's then assigned as a special racial ability of the DragonRace. You can see a similar example in how the WispMothers work, too.