Difference between revisions of "Papyrus FAQs"

630 bytes added ,  13:24, 11 May 2016
imported>Digitalparanoid
imported>Digitalparanoid
Line 250: Line 250:


=== How would I emulate a Break statement in a While loop? ===
=== How would I emulate a Break statement in a While loop? ===
You can emulate a <code>Break</code> statement like so:
<pre>
Bool bBreak = False 
While (<primary_condition>) && !bBreak   
  // do stuff   
  If <secondary_condition>   
    bBreak = True   
  EndIf     
EndWhile
</pre>
The alternative is to use [https://github.com/Orvid/Caprica Orvid's Caprica compiler], which allows you to use the <code>For</code>, <code>ForEach</code>, <code>Break</code>, and <code>Continue</code> statements.
Please remember that Caprica is an unofficial, alternative compiler that is not supported by Bethesda Softworks. Any questions or issues regarding Caprica should be directed to Orvid.
=== Are scripts saved in save games? ===
=== Are scripts saved in save games? ===
=== What's the alternative to OnUpdate, RegisterForUpdate, and RegisterForSingleUpdate? ===
=== What's the alternative to OnUpdate, RegisterForUpdate, and RegisterForSingleUpdate? ===