Difference between revisions of "Variables and Properties"
→From Within a Magic Effect Script: fixed code block to make sense and some spelling
imported>Delfofthebla m (Formatting tweaks) |
imported>Fowl (→From Within a Magic Effect Script: fixed code block to make sense and some spelling) |
||
Line 151: | Line 151: | ||
Scriptname myQuestNameScript extends Quest | Scriptname myQuestNameScript extends Quest | ||
Int Property | Int Property PublicInt Auto ; This value is defined as a property and can be accessed from outside this script | ||
Int | Int PrivateInt = 30 ; This value is private to the script and cannot be accessed from outside this script | ||
Function DamageTargBasedOnPublic(Actor akTarget) | Function DamageTargBasedOnPublic(Actor akTarget) | ||
Line 161: | Line 161: | ||
Function DamageTargBasedOnPrivate(Actor akTarget) | Function DamageTargBasedOnPrivate(Actor akTarget) | ||
;This code will damage the akTarget for | ;This code will damage the akTarget for PrivateInt damage | ||
akTarget.DamageAV("Health", | akTarget.DamageAV("Health", PrivateInt) | ||
EndFunction | EndFunction | ||
</source> | </source> | ||
Line 179: | Line 179: | ||
EndEvent | EndEvent | ||
</source> | </source> | ||
=Getting Properties From Any Other Script= | =Getting Properties From Any Other Script= |