Difference between revisions of "Variables and Properties"

5 bytes removed ,  02:36, 16 February 2012
→‎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 PublicDamage Auto ; This value is defined as a property and can be accessed from outside this script
Int Property PublicInt Auto ; This value is defined as a property and can be accessed from outside this script


Int PriviteDamage = 30 ; This value is private to the script and cannot be accessed from outside this script
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 PublicInt damage
;This code will damage the akTarget for PrivateInt damage
akTarget.DamageAV("Health", PublicInt)
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=
Anonymous user