Talk:SetActorValue - Actor
Revision as of 13:51, 6 June 2012 by imported>David Brasher (Adds an example script for SetAV Aggression.)
A Question
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
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)