OK, I think a glitch that was discovered long ago and that is mentioned in the middle of the internal scripts thread needs to be mentioned here.
The glitch is that if you load a script from iftrinkets or ifflag, the last line of the script is copied to the top, and is executed as an internal command the first time. The last line is actually the second last line, as it doesn't see the last line (that's also why you need a blank line at the end of every script).
That causes problems with the commands ifflag or iftrinkets, like mentioned
there.
However, there are other cases in which that's a problem. Consider this set of scripts:
ifflag(2,script2)
flag(2,on)
ifflag(3,script3)
flag(3,on)
ifflag(4,script4)
flag(4,on)
destroy(gravitylines)
All of them have one empty line in the end.
Consider that flags 2-4 are off every time you trigger it.
As you see, what it does is destroy gravity lines as soon as script1 is executed the 4th time.
However, it destroys them at the 2nd time. It's related to the glitch mentioned before.
What happens the first time it's triggered:
Checks for flag 2, sees that it's off and doesn't go to the other script and turn it on.
What happens the 2nd time:
Checks for flag 2, sees that it's on and goes to script2.
In there, because of the glitch, turns flag 3 on first and then check for flag 3. [edit]Oh, and that's because flag(x,on/off) works the same in internal scripting.[/edit] Sees it's on and goes to script3.In there, the same thing happens (except it's flag 4).
In script4, gravity lines are destroyed.
How to fix it? It's simple:
Just add a second empty line in scripts script2 and script3. That way, the first empty line is considered the last line.
I think this should be added to the tips...