You want more decoration on a finished map, but there are only 1,700 unit slots and the terrain layers cannot place an image. There is a way: create a unit, write 0 into its build size, and the image freezes in place - then remove the unit and the image stays.
- 1Point the sprite at whatever image you want and create the unit - as many as you like.
- 2Write 0 into that unit type's build size. Everything already created freezes at once.
- 3Remove the units. The images stay.
The author demonstrated it with 1,696 Marines plus four map revealers - exactly 1,700, the cap - frozen and then removed, with the images still drawn.
| No unit slots, but 500 of them | They do not count against the 1,700. Exactly 500 of them display, though, which is the same effect-sprite sub-limit as everything else - the free thing is the unit slot, not the sprite. |
|---|---|
| Leave one Door parked | Restoring the build size makes every frozen image vanish at once. Keeping one unit of that type parked at build size 0 is the handle that keeps the whole set alive. |
| A Door, not a building | A real building needs an iscript with a Built animation or it dolmens (116 Ion Cannon has one and no shadow, which makes it the one to borrow), and buildings snap to the tile grid. A Door needs no iscript change, places off-grid, and still draws outside vision. |
| Drawing functions 17 and 13 | 17 (Warp Texture) always comes out pure white, and it flashes three times and then crashes, so remove the unit before that. 13 does not draw outside vision at all - a shame, since it would otherwise be the most useful. |
| Not selectable, but on the minimap | You cannot click one even though you own it. And it shows on the minimap in player colour rather than ally green - a Door shows there not at all. |
Putting an effect image on a unit normally crashes when the effect ends. Here you delete the unit before it ends, so it never does - that is why this works, not a sign that effect images became safe. And giving a unit only the building status flag makes it crash when it leaves vision.
The second technique is “draw any frame of any image”. Reaching frames by rotation is comfortable for frame sets 0 and 13 and awkward for everything else. This is four lines.
function onPluginStart() {
Sprite("Left Upper Level Door").image = "Zealot";
Image("Zealot").iscript = "Vespene Geyser Shadow"; // 203
}
function beforeTriggerExec() {
RemoveUnit("Left Upper Level Door", P1); // 지난 프레임 것
SetMemory(0x57F1DC, SetTo, 0x11 * (2 + timer % 4)); // 타일셋을 속임
TrgUnit("Left Upper Level Door").startDirection = timer % 32;
CreateUnit(1, "Left Upper Level Door", "loc1", P1);
timer++;
}The reason it works is the good part. Iscript 203 calls playframtile once on init and then does nothing. playframtile means “play the frame for the current tileset” - it exists because a Vespene Geyser's outline differs per tileset. Write a nonsense tileset and it fetches a nonsense frame, which is exactly the frame you asked for. The unit's facing still applies on top, so it can add to the index and mirror.
| The iscript changes | That image can no longer be used as a real unit or building. Use it for drawing only. |
|---|---|
| The shadow is yours | If you want one, draw it the same way. |
| Incompatible with the yellow/red image techniques | They use the same machinery. |
| It fights anything that reads the tileset | 0x57F1DC is the real tileset id, so while you are lying about it everything tileset-dependent lies with you. Restore it in the same pass. |
Prefer this to rotation for anything beyond the first sixteen frames. It also makes reverse death animations and reverse motion easy, which rotation managed for only two frame sets.
The iscript indexThe five pools the engine draws from