An iscript header is simple: the four letters SCPE, one type number, then animation addresses two bytes each. There are 28 animations in all and their order is fixed - slot 0 Init, slot 1 Death, slot 2 ground attack start, slot 3 air attack start, ... slot 24 Disable, slot 27 Enable.
But not every script carries all 28. What the type decides is how many of the list it holds, counting from the front. Counted directly out of the installed game's iscript.bin:
| 0, 1 | 2 - Init and Death only. |
|---|---|
| 2 | 4. |
| 12, 13 | 14. The Marine is here. |
| 14, 15 | 16. |
| 20, 21 | 22. |
| 23, 24 | 26. |
| 26, 27 | 28 - all of them. |
Notice the numbers pair up. That regularity is part of why these figures are trustworthy. The old table that circulates says type 1 has 4 slots; it has 2.
And here is the problem. Disable is slot 24. A Marine has 14 slots, so slot 24 points outside the header, into the middle of the script body - and StarCraft does not read that as "no animation". It jumps there.
For the Marine that address is 0x0E80, which is the Ensnare overlay script. That is why a disabled Marine spins around: not a glitch, but somebody else's script being executed exactly.
A slot that reads as zero is worse. StarCraft does not treat address 0 as "none" either - it runs it, and iscript address 0 holds sprol 0 0 132, meaning "make a rock sprite 132 pixels above the current sprite". That floating rock you occasionally see in a use map is this.
Before Remastered this path usually just crashed, because the script runs an engine-only command on something that is not an engine. In Remastered it does not crash: the unit's graphics disappear and the rock is left. The symptom changed, the cause did not.
There is one common way into this in practice: using the Set Doodad State trigger on a unit that is not a doodad. Disable plays the Disable animation, Enable plays Enable and only works if it is already disabled - and if that unit's header has no slot 24, everything above happens.
So the rule is two lines. Do not use Set Doodad State on a unit that is not a doodad. And before reading or pointing at an animation slot, check that the type holds that slot at all - a slot that is not there is not empty, it is something else.
Every animation slotMaking any unit cast a spell