This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.

Difference between revisions of "If"

Jump to navigation Jump to search
688 bytes added ,  06:08, 1 May 2010
no edit summary
imported>UDUN
imported>UDUN
Line 152: Line 152:
  IF IsActor != 0 && Flag != 0
  IF IsActor != 0 && Flag != 0


== Comparisons and Reference Variables ==
In general it is better to use GetIsReference than using the logical operators with references (see the talk page).
So instead of:
<pre>if ( refVar == player )    ; especially in the case of the player this is unreliable</pre>
use
<pre>if ( refVar.getIsReference player )</pre>
Here are some equivalent ways to check if a refVar is a Welkynd stone :
<pre>
if refVar.GetIsID WelkyndStone
if refVar.GetIsID "00000191" ; valid but avoid it - makes code less readable
set refVarBase to WelkyndStone
if refVar.GetIsID refVarBase
set refVarBase to "00000191" ; valid but avoid it - makes code less readable
if refVar.GetIsID refVarBase
</pre>


== Assignment ==
== Assignment ==
Anonymous user

Navigation menu