Difference between revisions of "MessageBox Tutorial"
→Activator Disadvantages: Moved set Working to top to stop infinite looping
imported>Haama (→Activator Script: Moved setting Working to top to stop infinite loops) |
imported>Haama (→Activator Disadvantages: Moved set Working to top to stop infinite looping) |
||
Line 272: | Line 272: | ||
end</pre> | end</pre> | ||
Set Working to 0 when you wish to keep the script from running. | Set Working to 0 when you wish to keep the script from running. | ||
* These solutions work hand in hand. When the script should be running, and Working is 1, set Working to 1 at the | * These solutions work hand in hand. When the script should be running, and Working is 1, set Working to 1 at the beginning of every frame to keep it loaded for the next frame. When it's 0, don't set any variables and the activator will be unloaded, preventing the script from errantly running. Combining them looks like this: | ||
<pre>short Working | <pre>short Working | ||
... | ... | ||
Line 282: | Line 282: | ||
begin GameMode | begin GameMode | ||
if Working | if Working | ||
set Working to 1 | |||
if (Choosing == 0) | if (Choosing == 0) | ||
set Working to 0 | set Working to 0 | ||
Line 288: | Line 290: | ||
... | ... | ||
endif | endif | ||
endif | endif | ||
end</pre> | end</pre> |