Difference between revisions of "Actor Script"
Jump to navigation
Jump to search
imported>Bot Owned |
imported>CraftySentinel (Formatting Change) |
||
Line 20: | Line 20: | ||
== Global Functions == | == Global Functions == | ||
None | None | ||
== Member Functions == | |||
{|class="wikitable" width =100% | |||
!style="text-align:left;" width=25%|Function | |||
!style="text-align:left;"|Description | |||
|- | |||
|[[AddPerk - Actor|'''AddPerk'''(Perk ''akPerk'')]] | |||
|Adds the specified perk to this actor. | |||
|- | |||
|[[AddShout - Actor|Bool '''AddShout'''(Shout ''akShout'')]] | |||
|Adds the specified shout to this actor. | |||
|- | |||
|[[AddSpell - Actor|Bool '''AddSpell'''(Spell ''akSpell'', Bool ''abVerbose'')]] | |||
|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. | |||
|- | |||
|[[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 | |||
|- | |||
|[[AllowPCDialogue - Actor|'''AllowPCDialogue'''(Bool ''abTalk'')]] | |||
|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. | |||
|- | |||
|[[CanFlyHere - Actor|Bool '''CanFlyHere'''()]] | |||
|Can this actor fly here? | |||
|- | |||
|[[ClearArrested - Actor|'''ClearArrested'''()]] | |||
|Clears this actor's arrested state. | |||
|- | |||
|[[ClearExpressionOverride - Actor|'''ClearExpressionOverride'''()]] | |||
|Clears any expression override on this actor. | |||
|- | |||
|[[ClearExtraArrows - Actor|'''ClearExtraArrows'''()]] | |||
|Clears any arrow 3d on the actor. | |||
|- | |||
|[[ClearForcedLandingMarker - Actor|'''ClearForcedLandingMarker'''()]] | |||
|Clears any forced landing marker on this actor. | |||
|- | |||
|[[ClearKeepOffsetFromActor - Actor|'''ClearKeepOffsetFromActor'''()]] | |||
|Clears any keep offset from this actor. | |||
|- | |||
|[[ClearLookAt - Actor|'''ClearLookAt'''()]] | |||
|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. | |||
|- | |||
|[[DamageActorValue - Actor|'''DamageActorValue'''(String ''asValueName'', Float ''afDamage'')]] | |||
|Alias for DamageActorValue(). | |||
|- | |||
|[[Dismount - Actor|Bool '''Dismount'''()]] | |||
|Forces the actor to dismount. | |||
|- | |||
|[[DispelAllSpells - Actor|'''DispelAllSpells'''()]] | |||
|Dispel all spell from this actor | |||
|- | |||
|[[DispelSpell - Actor|Bool '''DispelSpell'''(Spell ''akSpell'')]] | |||
|Dispel a spell from this actor | |||
|- | |||
|[[DoCombatSpellApply - Actor|'''DoCombatSpellApply'''(Spell ''akSpell'', ObjectReference ''akTarget'')]] | |||
|Apply a spell to a target in combat | |||
|- | |||
|[[DrawWeapon - Actor|'''DrawWeapon'''()]] | |||
|Forces this actor to draw his weapon | |||
|- | |||
|[[EnableAI - Actor|'''EnableAI'''(Bool ''abEnable'')]] | |||
|Enables or disables this actor's AI. | |||
|- | |||
|[[EndDeferredKill - Actor|'''EndDeferredKill'''()]] | |||
|Removes the actor from a Deferred Kill state. | |||
|- | |||
|[[EquipItem - Actor|'''EquipItem'''(Form ''akItem'', Bool ''abPreventRemoval'', Bool ''abSlient'')]] | |||
|Equips the specified item on this actor. | |||
|- | |||
|[[EquipShout - Actor|'''EquipShout'''(Shout ''akShout'')]] | |||
|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. | |||
|- | |||
|[[EvaluatePackage - Actor|'''EvaluatePackage'''()]] | |||
|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. | |||
|- | |||
|[[ForceActorValue - Actor|'''ForceActorValue'''(String ''asValueName'', Float ''afNewValue'')]] | |||
|Alias for ForceActorValue(). | |||
|- | |||
|[[GetActorBase - Actor|ActorBase '''GetActorBase'''()]] | |||
|Returns the base actor object for this actor. | |||
|- | |||
|[[GetActorValue - Actor|Float '''GetActorValue'''(String ''asValueName'')]] | |||
|Retrieves the specified actor value from the actor. | |||
|- | |||
|[[GetActorValuePercentage - Actor|Float '''GetActorValuePercentage'''(String ''asValueName'')]] | |||
|Retrieves the specified actor value from the actor as a percentage of its maximum value. (From 0 to 1) | |||
|- | |||
|[[GetActorValue - Actor|Float '''GetActorValue'''(String ''asValueName'')]] | |||
|Alias for GetActorValue(). | |||
|- | |||
|[[GetActorValuePercentage - Actor|Float '''GetActorValuePercentage'''(String ''asValueName'')]] | |||
|Alias for GetActorValuePercentage(). | |||
|- | |||
|[[GetBaseActorValue - Actor|Float '''GetBaseActorValue'''(String ''asValueName'')]] | |||
|Gets the base value of the specified actor value. | |||
|- | |||
|[[GetBaseActorValue - Actor|Float '''GetBaseActorValue'''(String ''asValueName'')]] | |||
|Alias for GetBaseActorValue(). | |||
|- | |||
|[[GetBribeAmount - Actor|Int '''GetBribeAmount'''()]] | |||
|Returns the amount of gold required to bribe this actor. | |||
|- | |||
|[[GetCrimeFaction - Actor|Faction '''GetCrimeFaction'''()]] | |||
|Obtains this actor's crime faction. | |||
|- | |||
|[[GetCombatState - Actor|Int '''GetCombatState'''()]] | |||
|Obtains this actor's current combat state. | |||
|- | |||
|[[GetCombatTarget - Actor|Actor '''GetCombatTarget'''()]] | |||
|Obtains this actor's current combat target. | |||
|- | |||
|[[GetCurrentPackage - Actor|Package '''GetCurrentPackage'''()]] | |||
|Obtains the current package this actor's AI is running. | |||
|- | |||
|[[GetDialogueTarget - Actor|Actor '''GetDialogueTarget'''()]] | |||
|Obtains the actor's current dialogue target | |||
|- | |||
|[[GetEquippedItemType - Actor|Int '''GetEquippedItemType'''(Int ''aiHand'')]] | |||
|Obtains the type of item equipped in the specified hand. | |||
|- | |||
|[[GetEquippedShield - Actor|Armor '''GetEquippedShield'''()]] | |||
|Obtains the currently equipped shield on this actor. | |||
|- | |||
|[[GetEquippedShout - Actor|Shout '''GetEquippedShout'''()]] | |||
|Obtains the currently equipped shout on this actor. | |||
|- | |||
|[[GetEquippedSpell - Actor|Spell '''GetEquippedSpell'''(Int ''aiSource'')]] | |||
|Obtains the currently equipped spell in the specified source on this actor. | |||
|- | |||
|[[GetEquippedWeapon - Actor|Weapon '''GetEquippedWeapon'''(Bool ''abLeftHand'')]] | |||
|Obtains the currently equipped weapon on this actor. | |||
|- | |||
|[[GetFactionRank - Actor|Int '''GetFactionRank'''(Faction ''akFaction'')]] | |||
|Retrieves this actor's rank in the specified faction. | |||
|- | |||
|[[GetFactionReaction - Actor|Int '''GetFactionReaction'''(Actor ''akOther'')]] | |||
|Obtains this actor's faction-based reaction to the other actor. | |||
|- | |||
|[[GetFlyingState - Actor|Int '''GetFlyingState'''()]] | |||
|Obtains this actor's current flying state. | |||
|- | |||
|[[GetForcedLandingMarker - Actor|ObjectReference '''GetForcedLandingMarker'''()]] | |||
|Obtains the landing marker the actor is forced to land at (if any). | |||
|- | |||
|[[GetGoldAmount - Actor|Int '''GetGoldAmount'''()]] | |||
|Gets the amount of gold this actor has on his person. | |||
|- | |||
|[[GetHighestRelationshipRank - Actor|Int '''GetHighestRelationshipRank'''()]] | |||
|Gets this actor's highest relationship rank. | |||
|- | |||
|[[GetKiller - Actor|Actor '''GetKiller'''()]] | |||
|Gets this actor's killer. Returns None if this actor isn't dead. | |||
|- | |||
|[[GetLevel - Actor|Int '''GetLevel'''()]] | |||
|Gets this actor's current level. | |||
|- | |||
|[[GetLeveledActorBase - Actor|ActorBase '''GetLeveledActorBase'''()]] | |||
|Returns a leveled actor's "temporary" base object. | |||
|- | |||
|[[GetLightLevel - Actor|Float '''GetLightLevel'''()]] | |||
|Returns this actor's current light level | |||
|- | |||
|[[GetLowestRelationshipRank - Actor|Int '''GetLowestRelationshipRank'''()]] | |||
|Gets this actor's lowest relationship rank. | |||
|- | |||
|[[GetNoBleedoutRecovery - Actor|Bool '''GetNoBleedoutRecovery'''()]] | |||
|Gets whether this actor can recover from bleedout or not. | |||
|- | |||
|[[GetPlayerControls - Actor|Bool '''GetPlayerControls'''()]] | |||
|Queries whether this actor receives player input | |||
|- | |||
|[[GetRace - Actor|Race '''GetRace'''()]] | |||
|Returns this actor's race. | |||
|- | |||
|[[GetRelationshipRank - Actor|Int '''GetRelationshipRank'''(Actor ''akOther'')]] | |||
|Retrieves the relationship rank between this actor and another. | |||
|- | |||
|[[GetSitState - Actor|Int '''GetSitState'''()]] | |||
|Obtains this actor's sit state. | |||
|- | |||
|[[GetSleepState - Actor|Int '''GetSleepState'''()]] | |||
|Obtains this actor's sleep state. | |||
|- | |||
|[[GetVoiceRecoveryTime - Actor|Float '''GetVoiceRecoveryTime'''()]] | |||
|Gets the voice recovery time from the actor. | |||
|- | |||
|[[HasAssociation - Actor|Bool '''HasAssociation'''(AssociationType ''akAssociation'', Actor ''akOther'')]] | |||
|Returns whether this actor has the specified association with the other actor. | |||
|- | |||
|[[HasFamilyRelationship - Actor|Bool '''HasFamilyRelationship'''(Actor ''akOther'')]] | |||
|Returns whether this actor has a family relationship with the other actor. | |||
|- | |||
|[[HasLOS - 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) | |||
|- | |||
|[[HasMagicEffect - Actor|Bool '''HasMagicEffect'''(MagicEffect ''akEffect'')]] | |||
|Checks to see if this actor is currently being affected by the given Magic Effect | |||
|- | |||
|[[HasMagicEffectWithKeyword - Actor|Bool '''HasMagicEffectWithKeyword'''(Keyword ''akKeyword'')]] | |||
|Checks to see if this actor is currently being affected by a Magic Effect with the given Keyword | |||
|- | |||
|[[HasParentRelationship - Actor|Bool '''HasParentRelationship'''(Actor ''akOther'')]] | |||
|Returns whether this actor has a parent relationship with the other actor. | |||
|- | |||
|[[HasPerk - Actor|Bool '''HasPerk'''(Perk ''akPerk'')]] | |||
|Checks to see if this actor has the given Perk | |||
|- | |||
|[[HasSpell - Actor|Bool '''HasSpell'''(Form ''akForm'')]] | |||
|Checks to see if this actor has the given Spell or Shout | |||
|- | |||
|[[IsAlarmed - Actor|Bool '''IsAlarmed'''()]] | |||
|Obtains whether this actor is alarmed or not. | |||
|- | |||
|[[IsAlerted - Actor|Bool '''IsAlerted'''()]] | |||
|Returns if this actor is alerted or not. | |||
|- | |||
|[[IsAllowedToFly - Actor|Bool '''IsAllowedToFly'''()]] | |||
|Is this actor allowed to fly? | |||
|- | |||
|[[IsArrested - Actor|Bool '''IsArrested'''()]] | |||
|Returns whether this actor is currently arrested or not. | |||
|- | |||
|[[IsArrestingTarget - Actor|Bool '''IsArrestingTarget'''()]] | |||
|Is this actor currently arresting his target? Only valid on alerted guards. | |||
|- | |||
|[[IsBeingRidden - Actor|Bool '''IsBeingRidden'''()]] | |||
|Is this actor being ridden? | |||
|- | |||
|[[IsBleedingOut - Actor|Bool '''IsBleedingOut'''()]] | |||
|Is this actor currently bleeding out? | |||
|- | |||
|[[IsBribed - Actor|Bool '''IsBribed'''()]] | |||
|Gets if this actor has been bribed by the player. | |||
|- | |||
|[[IsChild - Actor|Bool '''IsChild'''()]] | |||
|Is this actor a child? | |||
|- | |||
|[[IsCommandedActor - Actor|Bool '''IsCommandedActor'''()]] | |||
|Is this actor commanded by another? | |||
|- | |||
|[[IsDead - Actor|Bool '''IsDead'''()]] | |||
|Obtains whether this actor is dead or not. | |||
|- | |||
|[[IsDetectedBy - Actor|Bool '''IsDetectedBy'''(Actor ''akOther'')]] | |||
|Is this actor detected by the other one? | |||
|- | |||
|[[IsDoingFavor - Actor|Bool '''IsDoingFavor'''()]] | |||
|Is this actor currently flagged as doing a favor for the player? | |||
|- | |||
|[[IsEquipped - Actor|Bool '''IsEquipped'''(Form ''akItem'')]] | |||
|Is the specified object equipped on this actor? | |||
|- | |||
|[[IsEssential - Actor|Bool '''IsEssential'''()]] | |||
|Is this actor essential? | |||
|- | |||
|[[IsFlying - Actor|Bool '''IsFlying'''()]] | |||
|Is this actor currently flying? | |||
|- | |||
|[[IsGhost - Actor|Bool '''IsGhost'''()]] | |||
|Is this actor flagged as a ghost? | |||
|- | |||
|[[IsGuard - Actor|Bool '''IsGuard'''()]] | |||
|Obtains whether this actor is a guard or not. | |||
|- | |||
|[[IsHostileToActor- Actor|Bool '''IsHostileToActor-'''(Actor ''akActor'')]] | |||
|Is this actor hostile to another actor? | |||
|- | |||
|[[IsInCombat - Actor|Bool '''IsInCombat'''()]] | |||
|Obtains whether this actor is in combat or not. | |||
|- | |||
|[[IsInFaction - Actor|Bool '''IsInFaction'''(Faction ''akFaction'')]] | |||
|Returns whether this actor is in the specified faction. | |||
|- | |||
|[[IsInKillMove - Actor|Bool '''IsInKillMove'''()]] | |||
|Returns whether this actor is in a kill move or not. | |||
|- | |||
|[[IsIntimidated - Actor|Bool '''IsIntimidated'''()]] | |||
|Gets if this actor has been intimidated by the player. | |||
|- | |||
|[[IsOnMount - Actor|Bool '''IsOnMount'''()]] | |||
|Is the actor on a mount? | |||
|- | |||
|[[IsPlayersLastRiddenHorse - Actor|Bool '''IsPlayersLastRiddenHorse'''()]] | |||
|Returns whether this actor is the horse the player last rode. | |||
|- | |||
|[[IsPlayerTeammate - Actor|Bool '''IsPlayerTeammate'''()]] | |||
|Returns whether this actor is currently a teammate of the player. | |||
|- | |||
|[[IsRunning - Actor|Bool '''IsRunning'''()]] | |||
|Returns whether this actor is current running. | |||
|- | |||
|[[IsSneaking - Actor|Bool '''IsSneaking'''()]] | |||
|Is this actor currently sneaking? | |||
|- | |||
|[[IsSprinting - Actor|Bool '''IsSprinting'''()]] | |||
|Is this actor currently sprinting? | |||
|- | |||
|[[IsTrespassing - Actor|Bool '''IsTrespassing'''()]] | |||
|Returns whether this actor is currently trespassing or not. | |||
|- | |||
|[[IsUnconscious - Actor|Bool '''IsUnconscious'''()]] | |||
|Is this actor currently unconscious? | |||
|- | |||
|[[IsWeaponDrawn - Actor|Bool '''IsWeaponDrawn'''()]] | |||
|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 | |||
|- | |||
|[[Kill - Actor|'''Kill'''(Actor ''akKiller'')]] | |||
|Kills this actor with the specified actor as the guilty party. | |||
|- | |||
|[[KillEssential - Actor|'''KillEssential'''(Actor ''akKiller'')]] | |||
|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 | |||
|- | |||
|[[MakePlayerFriend - Actor|'''MakePlayerFriend'''()]] | |||
|Makes the actor a friend of the player. | |||
|- | |||
|[[ModActorValue - Actor|'''ModActorValue'''(String ''asValueName'', Float ''afAmount'')]] | |||
|Modifies the specified actor value by the specified amount. | |||
|- | |||
|[[ModActorValue - Actor|'''ModActorValue'''(String ''asValueName'', Float ''afAmount'')]] | |||
|Alias for ModActorValue(). | |||
|- | |||
|[[ModFactionRank - Actor|'''ModFactionRank'''(Faction ''akFaction'', Int ''aiMod'')]] | |||
|Modifies this actor's rank in the specified faction. | |||
|- | |||
|[[MoveToPackageLocation - Actor|'''MoveToPackageLocation'''()]] | |||
|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. | |||
|- | |||
|[[PathToReference - Actor|Bool '''PathToReference'''(ObjectReference ''aTarget'', Float ''afWalkRunPercent'')]] | |||
|Makes the actor path to the target reference at the speed given by afWalkRunercent. | |||
|- | |||
|[[PlayIdle - Actor|Bool '''PlayIdle'''(Idle ''akIdle'')]] | |||
|Plays the passed idle on this actor. | |||
|- | |||
|[[PlayIdleWithTarget - 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- Actor|'''PlaySubGraphAnimation-'''(String ''asEventName'')]] | |||
|Sends the event passed to the actor's sub graphs. | |||
|- | |||
|[[RemoveFromFaction - Actor|'''RemoveFromFaction'''(Faction ''akFaction'')]] | |||
|Removes this actor from the specified faction. | |||
|- | |||
|[[RemoveFromAllFactions - Actor|'''RemoveFromAllFactions'''()]] | |||
|Removes this actor from all factions they are associated with. | |||
|- | |||
|[[RemovePerk - Actor|'''RemovePerk'''(Perk ''akPerk'')]] | |||
|Removes the specified perk from this actor. | |||
|- | |||
|[[RemoveShout - Actor|Bool '''RemoveShout'''(Shout ''akShout'')]] | |||
|Removes the specified shout from this actor. | |||
|- | |||
|[[RemoveSpell - Actor|Bool '''RemoveSpell'''(Spell ''akSpell'')]] | |||
|Removes the specified spell from this actor. | |||
|- | |||
|[[ResetHealthAndLimbs - Actor|'''ResetHealthAndLimbs'''()]] | |||
|Resets this actor's health and limb state. | |||
|- | |||
|[[RestoreActorValue - Actor|'''RestoreActorValue'''(String ''asValueName'', Float ''afAmount'')]] | |||
|Restores damage done to the specified actor value. | |||
|- | |||
|[[RestoreActorValue - Actor|'''RestoreActorValue'''(String ''asValueName'', Float ''afAmount'')]] | |||
|Alias for RestoreActorValue(). | |||
|- | |||
|[[Resurrect - Actor|'''Resurrect'''()]] | |||
|Resurrects this actor. | |||
|- | |||
|[[SendAssaultAlarm - Actor|'''SendAssaultAlarm'''()]] | |||
|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 | |||
|- | |||
|[[SetActorValue - Actor|'''SetActorValue'''(String ''asValueName'', Float ''afValue'')]] | |||
|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) | |||
|- | |||
|[[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) | |||
|- | |||
|[[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. | |||
|- | |||
|[[SetAlpha - Actor|'''SetAlpha'''(Float ''afTargetAlpha'', Bool ''abFade'')]] | |||
|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. | |||
|- | |||
|[[SetActorValue - Actor|'''SetActorValue'''(String ''asValueName'', Float ''afValue'')]] | |||
|Alias for SetActorValue(). | |||
|- | |||
|[[SetBribed - Actor|'''SetBribed'''(Bool ''abBribe'')]] | |||
|Sets if this actor is being bribed by the player. | |||
|- | |||
|[[SetCrimeFaction - Actor|'''SetCrimeFaction'''(Faction ''akFaction'')]] | |||
|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) | |||
|- | |||
|[[SetDoingFavor - Actor|'''SetDoingFavor'''(Bool ''abDoingFavor'')]] | |||
|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. | |||
|- | |||
|[[SetEyeTexture - Actor|'''SetEyeTexture'''(TextureSet ''akTexture'')]] | |||
|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. | |||
|- | |||
|[[SetForcedLandingMarker - Actor|'''SetForcedLandingMarker'''(ObjectReference ''aMarker'')]] | |||
|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. | |||
|- | |||
|[[SetHeadTracking - Actor|'''SetHeadTracking'''(Bool ''abEnable'')]] | |||
|Enables or disables this actor's head tracking. | |||
|- | |||
|[[SetIntimidated - Actor|'''SetIntimidated'''(Bool ''abIntimidate'')]] | |||
|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. | |||
|- | |||
|[[SetNoBleedoutRecovery - Actor|'''SetNoBleedoutRecovery'''(Bool ''abAllowed'')]] | |||
|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 | |||
|- | |||
|[[SetOutfit - Actor|'''SetOutfit'''(Outfit ''akOutfit'', Bool ''abSleepOutfit'')]] | |||
|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. | |||
|- | |||
|[[SetPlayerResistingArrest - Actor|'''SetPlayerResistingArrest'''()]] | |||
|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. | |||
|- | |||
|[[SetRace - Actor|'''SetRace'''(Race ''akRace'')]] | |||
|Sets the actor's race | |||
|- | |||
|[[SetRelationshipRank - Actor|'''SetRelationshipRank'''(Actor ''akOther'', Int ''aiRank'')]] | |||
|Sets the relationship rank between this actor and another. | |||
|- | |||
|[[SetRestrained - Actor|'''SetRestrained'''(Bool ''abRestrained'')]] | |||
|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. | |||
|- | |||
|[[SetUnconscious - Actor|'''SetUnconscious'''(Bool ''abIsUnconscious'')]] | |||
|Sets this actor as unconscious or not. | |||
|- | |||
|[[SetVehicle - Actor|'''SetVehicle'''(ObjectReference ''akVehicle'')]] | |||
|Attaches or detaches this actor from a vehicle. | |||
|- | |||
|[[SetVoiceRecoveryTime - Actor|'''SetVoiceRecoveryTime'''(Float ''afTime'')]] | |||
|Sets the voice recovery time on the actor. | |||
|- | |||
|[[ShowBarterMenu - Actor|'''ShowBarterMenu'''()]] | |||
|Shows the barter menu for this actor. | |||
|- | |||
|[[ShowGiftMenu - Actor|'''ShowGiftMenu'''()]] | |||
|Shows the give/take menu for this actor. | |||
|- | |||
|[[StartCannibal - Actor|'''StartCannibal'''(Actor ''akTarget'')]] | |||
|Has the actor feed on a dead actor. | |||
|- | |||
|[[StartCombat - Actor|'''StartCombat'''(Actor ''akTarget'')]] | |||
|Attempts to initiate combat with the other actor. | |||
|- | |||
|[[StartDeferredKill - Actor|'''StartDeferredKill'''()]] | |||
|Puts the actor into a Deferred Kill state | |||
|- | |||
|[[StartSneaking - Actor|'''StartSneaking'''()]] | |||
|Forces this actor to start sneaking. | |||
|- | |||
|[[StartVampireFeed - Actor|'''StartVampireFeed'''(Actor ''akTarget'')]] | |||
|Has the actor vampire feed on a sleeping actor | |||
|- | |||
|[[StopCombat - Actor|'''StopCombat'''()]] | |||
|Removes this actor from combat. | |||
|- | |||
|[[StopCombatAlarm - Actor|'''StopCombatAlarm'''()]] | |||
|Stops all combat and alarms against this actor. | |||
|- | |||
|[[TrapSoul - Actor|Bool '''TrapSoul'''(Actor ''akTarget'')]] | |||
|Attempts to soul trap the target actor - and returns if it succeeded or not. | |||
|- | |||
|[[UnequipAll - Actor|'''UnequipAll'''()]] | |||
|Unequips all items from this actor. | |||
|- | |||
|[[UnequipItem - Actor|'''UnequipItem'''(Form ''akItem'', Bool ''abPreventEquip'', Bool ''abSilent'')]] | |||
|Unequips an item from this actor. | |||
|- | |||
|[[UnequipItemSlot - Actor|'''UnequipItemSlot'''(Int ''aiSlot'')]] | |||
|Forces this actor to unequip all armor on the given slot. | |||
|- | |||
|[[UnequipShout - Actor|'''UnequipShout'''(Shout ''akShout'')]] | |||
|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. | |||
|- | |||
|[[UnlockOwnedDoorsInCell - Actor|'''UnlockOwnedDoorsInCell'''()]] | |||
|Has this actor unlock any doors he owns in the cell he's currently in (if it is an interior). | |||
|- | |||
|[[WillIntimidateSucceed - Actor|Bool '''WillIntimidateSucceed'''()]] | |||
|Returns whether an intimidation attempt by the player against this actor will succeed or not. | |||
|- | |||
|[[WornHasKeyword - Actor|Bool '''WornHasKeyword'''(Keyword ''akKeyword'')]] | |||
|Returns whether or not this actor is wearing anything with the specified keyword. | |||
|- | |||
|} | |||
== SKSE Member Functions == | == SKSE Member Functions == | ||
{|class="wikitable" width =100% | |||
!style="text-align:left;" width=25%|Function | |||
!style="text-align:left;"|Description | |||
|- | |||
|[[GetWornForm - Actor|Form '''GetWornForm'''(Int ''slotMask'')]] | |||
|Returns the form of the item worn with the specified slotMask. | |||
|- | |||
|[[GetEquippedObject - Actor|Form '''GetEquippedObject'''(Int ''location'')]] | |||
| Returns the object currently equipped in the specified location. | |||
|- | |||
|[[GetSpellCount - Actor|Int '''GetSpellCount'''()]] | |||
|Returns the number of added spells for the actor. | |||
|- | |||
|[[GetNthSpell - Actor|Spell '''GetNthSpell'''(Int ''n'')]] | |||
|Returns the specified added spell for the actor. | |||
|- | |||
|[[QueueNiNodeUpdate - Actor|'''QueueNiNodeUpdate'''()]] | |||
|Updates modifications linked to the actor. | |||
|- | |||
|[[EquipItemEx - Actor|'''EquipItemEx'''(Form ''item'', Int ''equipSlot'', Bool ''preventUnequip'', Bool ''equipSound'')]] | |||
|Force equips 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. | |||
|- | |||
|[[RegenerateHead - Actor|'''RegenerateHead'''()]] | |||
| Updates an Actors head mesh. | |||
|- | |||
|[[ChangeHeadPart - Actor|'''ChangeHeadPart'''(HeadPart ''hPart'')]] | |||
| Adds a headpart, if the type exists it will replace. | |||
|- | |||
|[[UpdateWeight - Actor|'''UpdateWeight'''()]] | |||
| Visually updates the actors weight. | |||
|- | |||
|[[IsAIEnabled - Actor|Bool '''IsAIEnabled'''()]] | |||
| Returns whether the actors AI is enabled | |||
|- | |||
''' | |[[IsSwimming - Actor|Bool '''IsSwimming'''()]] | ||
| Returns whether the actor is currently swimming. | |||
|- | |||
|[[SheatheWeapon - Actor|'''SheatheWeapon'''()]] | |||
| Sheathes the actors weapon. | |||
|- | |||
|} | |||
== Events == | == Events == | ||
''' | {|class="wikitable" width =100% | ||
!style="text-align:left;" width=25%|Function | |||
!style="text-align:left;"|Description | |||
|- | |||
|[[OnCombatStateChanged - Actor|'''OnCombatStateChanged'''(Actor ''akTarget'', Int ''aeCombatState'')]] | |||
|Sent when this actor's combat state changes. | |||
|- | |||
|[[OnDeath - Actor|'''OnDeath'''(Actor ''akKiller'')]] | |||
|Event received when this actor dies. | |||
|- | |||
|[[OnDying - Actor|'''OnDying'''(Actor ''akKiller'')]] | |||
|Event received when this actor begins to die. | |||
|- | |||
|[[OnEnterBleedout - Actor|'''OnEnterBleedout'''()]] | |||
|Event received when this object enters bleedout. | |||
|- | |||
|[[OnGetUp - Actor|'''OnGetUp'''(ObjectReference ''akFurniture'')]] | |||
|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. | |||
|- | |||
|[[OnObjectEquipped - Actor|'''OnObjectEquipped'''(Form ''akBaseObject'', ObjectReference ''akReference'')]] | |||
|Event received when this actor equips an object. | |||
|- | |||
|[[OnObjectUnequipped - Actor|'''OnObjectUnequipped'''(Form ''akBaseObject'', ObjectReference ''akReference'')]] | |||
|Event received when this actor unequips an object. | |||
|- | |||
|[[OnPackageChange - Actor|'''OnPackageChange'''(Package ''akOldPackage'')]] | |||
|Event received when this actor changes away from a package. | |||
|- | |||
|[[OnPackageEnd - Actor|'''OnPackageEnd'''(Package ''akOldPackage'')]] | |||
|Event received when this actor ends a package. | |||
|- | |||
|[[OnPackageStart - Actor|'''OnPackageStart'''(Package ''akNewPackage'')]] | |||
|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. | |||
|- | |||
|[[OnPlayerLoadGame - Actor|'''OnPlayerLoadGame'''()]] | |||
|Event received by the player actor when a saved game is loaded. | |||
|- | |||
|[[OnRaceSwitchComplete - Actor|'''OnRaceSwitchComplete'''()]] | |||
|Event received when this actor finishes switching races. | |||
|- | |||
|[[OnSit - Actor|'''OnSit'''(ObjectReference ''akFurniture'')]] | |||
|Event received when this actor sits on the specified furniture. | |||
|- | |||
|} | |||
== 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 in 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, we attach this script to '''AbFXDragonBloodDamage''', which is an effect on the '''AbDragonBloodFX''' spell. That's then assigned as a special racial ability of the '''DragonRace'''. You can look at a similar example in how the WispMothers work, too. | ** There is a workaround in 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, we attach this script to '''AbFXDragonBloodDamage''', which is an effect on the '''AbDragonBloodFX''' spell. That's then assigned as a special racial ability of the '''DragonRace'''. You can look at a similar example in how the WispMothers work, too. |
Revision as of 03:41, 24 October 2013
Extends: ObjectReference Script
Script for the manipulation of actor instances.
Definition
ScriptName Actor extends ObjectReference
Properties
None
Global Functions
None
Member Functions
Function | Description |
---|---|
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? |
ClearArrested() | Clears this actor's arrested state. |
ClearExpressionOverride() | Clears any expression override on this actor. |
ClearExtraArrows() | Clears any arrow 3d on the actor. |
ClearForcedLandingMarker() | Clears any forced landing marker on this actor. |
ClearKeepOffsetFromActor() | Clears any keep offset from this actor. |
ClearLookAt() | Clears this actor's script-forced look at target. |
DamageActorValue(String asValueName, Float afDamage) | Damages the specified actor value by the specified amount. |
DamageActorValue(String asValueName, Float afDamage) | Alias for DamageActorValue(). |
Bool Dismount() | Forces the actor to dismount. |
DispelAllSpells() | 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 |
DrawWeapon() | Forces this actor to draw his weapon |
EnableAI(Bool abEnable) | Enables or disables this actor's AI. |
EndDeferredKill() | Removes the actor from a Deferred Kill state. |
EquipItem(Form akItem, Bool abPreventRemoval, Bool abSlient) | 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. |
EvaluatePackage() | Forces the AI to re-evaluate its package stack. |
ForceActorValue(String asValueName, Float afNewValue) | Forces the specified actor value to the specified value. |
ForceActorValue(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 GetActorValue(String asValueName) | Alias for GetActorValue(). |
Float GetActorValuePercentage(String asValueName) | Alias for GetActorValuePercentage(). |
Float GetBaseActorValue(String asValueName) | Gets the base value of the specified actor value. |
Float GetBaseActorValue(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 |
MakePlayerFriend() | Makes the actor a friend of the player. |
ModActorValue(String asValueName, Float afAmount) | Modifies the specified actor value by the specified amount. |
ModActorValue(String asValueName, Float afAmount) | Alias for ModActorValue(). |
ModFactionRank(Faction akFaction, Int aiMod) | Modifies this actor's rank in the specified faction. |
MoveToPackageLocation() | 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. |
RemoveFromAllFactions() | 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. |
ResetHealthAndLimbs() | Resets this actor's health and limb state. |
RestoreActorValue(String asValueName, Float afAmount) | Restores damage done to the specified actor value. |
RestoreActorValue(String asValueName, Float afAmount) | Alias for RestoreActorValue(). |
Resurrect() | Resurrects this actor. |
SendAssaultAlarm() | 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. |
SetActorValue(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. |
SetPlayerResistingArrest() | 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. |
ShowBarterMenu() | Shows the barter menu for this actor. |
ShowGiftMenu() | 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. |
StartDeferredKill() | Puts the actor into a Deferred Kill state |
StartSneaking() | Forces this actor to start sneaking. |
StartVampireFeed(Actor akTarget) | Has the actor vampire feed on a sleeping actor |
StopCombat() | Removes this actor from combat. |
StopCombatAlarm() | 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. |
UnequipAll() | 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. |
UnlockOwnedDoorsInCell() | 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. |
SKSE Member Functions
Function | Description |
---|---|
Form GetWornForm(Int slotMask) | Returns the form of the item worn with the specified slotMask. |
Form GetEquippedObject(Int location) | Returns the object currently equipped 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. |
QueueNiNodeUpdate() | Updates modifications linked to the actor. |
EquipItemEx(Form item, Int equipSlot, Bool preventUnequip, Bool equipSound) | Force equips the specified item to the specified slot. |
UnequipItemEx(Form item, Int equipSlot, Bool preventEquip) | Force unequips the specified item at the specified slot. |
RegenerateHead() | Updates an Actors head mesh. |
ChangeHeadPart(HeadPart hPart) | Adds a headpart, if the type exists it will replace. |
UpdateWeight() | Visually updates the actors weight. |
Bool IsAIEnabled() | Returns whether the actors AI is enabled |
Bool IsSwimming() | Returns whether the actor is currently swimming. |
SheatheWeapon() | Sheathes the actors weapon. |
Events
Function | Description |
---|---|
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. |
OnEnterBleedout() | 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. |
OnPlayerLoadGame() | Event received by the player actor when a saved game is loaded. |
OnRaceSwitchComplete() | Event received when this actor finishes switching races. |
OnSit(ObjectReference akFurniture) | Event received when this actor sits on the specified furniture. |
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.
- There is a workaround in 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, we attach this script to AbFXDragonBloodDamage, which is an effect on the AbDragonBloodFX spell. That's then assigned as a special racial ability of the DragonRace. You can look at a similar example in how the WispMothers work, too.