Difference between revisions of "Talk:Cast Reference"

Jump to navigation Jump to search
9 bytes added ,  21:23, 12 December 2014
no edit summary
imported>Egocarib
imported>Egocarib
Line 7: Line 7:
<source lang="papyrus">
<source lang="papyrus">
         ;assign bool to global:
         ;assign bool to global:
         SomeGlobalVariable.SetValue(yourBool as Int) ;casting bool to int results in 1 if the bool is true, and 0 if the bool is false
         SomeGlobalVariable.SetValueInt(yourBool as Int) ;casting bool to int results in 1 if the bool is true, and 0 if the bool is false


         ;assign global back to bool
         ;assign global back to bool
         yourBool = SomeGlobalVariable.GetValue() ;yourBool will be true if the global value has any non-zero value (positive or negative).
         yourBool = SomeGlobalVariable.GetValueInt() ;yourBool will be true if the global value has any non-zero value (positive or negative).
                                                ;yourBool will be false if the global equals 0
                                                    ;yourBool will be false if the global equals 0
</source>
</source>
:--[[User:Egocarib|egocarib]] ([[User talk:Egocarib|talk]]) 2014-12-12T20:55:07 (EST)
:--[[User:Egocarib|egocarib]] ([[User talk:Egocarib|talk]]) 2014-12-12T20:55:07 (EST)
Anonymous user

Navigation menu