Talk:SetActorValue - Actor
Revision as of 22:33, 23 April 2014 by imported>KainXavier (An observation about using the SetActorValue function with the "DamageResist" actor value)
A Question[edit source]
Will using the SetAV code cause a permanent change of the base value ie after a save will it still be present?
Example Script: SetAV Aggression from Trigger Zone[edit source]
Scriptname AAMyBadGuyGetsMadScript extends ObjectReference
; Attached to custom trigger zone. Previously non-hostile bandit with aggression of 0 attacks player when he or she bumps into trigger zone.
Event OnTriggerEnter(ObjectReference akActionRef)
if(akActionRef == Game.GetPlayer())
AAMyBadGuyREF.SetAV ("Aggression", 2)
endif
EndEvent
Actor Property AAMyBadGuyREF Auto
SetAV Aggression In conjunction with Faction Relationships, determines when the Actor will initiate combat:
Type | Value | Description |
---|---|---|
Unaggressive | 0 | Will not initiate combat. |
Aggressive | 1 | Will attack Enemies on sight. |
Very Aggressive | 2 | Will attack Enemies and Neutrals on sight. |
Frenzied | 3 | Will attack anyone on sight. Actors are rarely set to Frenzied by default; this is usually the result of some other spell or effect (like the Frenzy spell). |
--David Brasher 14:51, 6 June 2012 (EDT)
Equipping / Unequipping Armor[edit source]
Something worth noting is that armor appears to modify the base value of the "DamageResist" actor value. However, any attempts to alter the same actor value with SetActorValue() fail. The current value must be altered instead. --KainXavier (talk) 2014-04-23T23:33:20 (EDT)