Difference between revisions of "Talk:SetActorValue - Actor"
Adds an example script for SetAV Aggression.
imported>David Brasher m (Formatting) |
imported>David Brasher (Adds an example script for SetAV Aggression.) |
||
Line 1: | Line 1: | ||
== A Question == | == A Question == | ||
Will using the SetAV code cause a permanent change of the base value ie after a save will it still be present? | 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 == | |||
<source lang="papyrus"> | |||
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 | |||
</source> | |||
SetAV Aggression In conjunction with [[Factions Tab|Faction Relationships]], determines when the Actor will initiate combat: | |||
{|border="1" cellpadding="5" cellspacing="0" | |||
|- | |||
! style="background:#efefef;" | Type | |||
! style="background:#efefef;" | Value | |||
! style="background:#efefef;" | 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). | |||
|- | |||
|} | |||
--[[User:David Brasher|David Brasher]] 14:51, 6 June 2012 (EDT) |