Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Creating disabled unit sprites
Creating disabled unit sprites
Jun 25 2016, 5:30 pm
By: Oh_Man  

Jun 25 2016, 5:30 pm Oh_Man Post #1

Find Me On Discord (Brood War UMS Community & Staredit Network)

Okay so I was reading this:
http://www.staredit.net/wiki/index.php/Vision

It says:
"Note that the upgraded ghost (including heroes) can be a disabled unit sprite so that any unit can walk over it. Infested Kerrigan can't be disabled in the same way."


How exactly do I create/remove disabled unit sprites??




Jun 25 2016, 6:08 pm jjf28 Post #2

Cartography Artisan

AFAIK disabled unit sprites (or sprite units, for less confusion) can only be preplaced by placing a sprite and checking the Active/Disabled flag (or by setting the same properties with EUDs).



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 26 2016, 12:46 am LoveLess Post #3

Let me show you how to hump without making love.

Quote from Oh_Man
Okay so I was reading this:
http://www.staredit.net/wiki/index.php/Vision

It says:
"Note that the upgraded ghost (including heroes) can be a disabled unit sprite so that any unit can walk over it. Infested Kerrigan can't be disabled in the same way."


How exactly do I create/remove disabled unit sprites??
I am useful! From here on, I am assuming you use Draft.

So to create these, select Unit Sprites and find the units you want. This includes Marines, Firebats, Ghosts, Zerglings, Larvae, and Dark Templar. All versions of these units work. When placed, go into their properties, and check off Disabled. Place them somewhere that is invisible to the player, if a player looks at a disabled unit sprite they will crash. Be aware that the end result of creating one of these will leave behind a sprite, so making this an unplayable area is best.

Now with triggers, enable each of these units individually. They bug out if you enable too many right away, or you might just crash the game, from what I remember. Doing this in intervals of every half second is pretty safe. From here on out, those units can be walked through, but they will not walk through other units, unless that other unit is also a Disabled Unit Sprite. You can now utilize these in quite weird but awesome ways, I have a few maps showing off this concept if you want to look in the DB.



None.

Jun 26 2016, 4:54 am Oh_Man Post #4

Find Me On Discord (Brood War UMS Community & Staredit Network)

What are the maps? Link?




Jun 26 2016, 7:59 am LoveLess Post #5

Let me show you how to hump without making love.

http://www.staredit.net/sc1db/file/25/

http://www.staredit.net/sc1db/file/26/

This is a better proof of concept made by ShadowRune after he asked how to do the sprites. http://www.staredit.net/sc1db/file/3528/



None.

Jul 20 2016, 6:18 pm Sie_Sayoka Post #6



What would be the process of replicating this within SCMD2?


http://falkoner.cow.googlepages.com/Disabled_Sprite_Effects.html



None.

Jul 20 2016, 7:07 pm Roy Post #7

An artist's depiction of an Extended Unit Death

Quote from Sie_Sayoka
What would be the process of replicating this within SCMD2?


http://falkoner.cow.googlepages.com/Disabled_Sprite_Effects.html
Here's a link to a more up-to-date article with a screenshot for ScmDraft: http://www.staredit.net/wiki/index.php?title=Disabled_Sprite_Effects

You can also just use the "Set Doodad State" trigger. If you do the disable-enable trick with a unit sprite, it will have no collision.

Post has been edited 2 time(s), last time on Jul 20 2016, 7:13 pm by Roy.




Jul 20 2016, 9:34 pm Sie_Sayoka Post #8



Thanks. I can't seem to get the same results with Falkoner's list. Has the game been patched since that list was made or something?

Nevermind. You need to click on the unit ID in the list in order to actually select it.

Post has been edited 1 time(s), last time on Jul 30 2016, 1:13 am by Sie_Sayoka.



None.

Jul 21 2016, 3:59 am Roy Post #9

An artist's depiction of an Extended Unit Death

From the article: "Many of these are now incorrect, or have been verified otherwise. It is best to try it out for yourself."

It's a quirk from unexpected behavior, and it varies between versions of SC, and in some cases, even the operating system it's running on.




Jul 21 2016, 6:46 am Sie_Sayoka Post #10



That's unfortunate. Would these effects be client-side then?



None.

Jul 22 2016, 7:09 pm Roy Post #11

An artist's depiction of an Extended Unit Death

As opposed to network-side? The inconsistency could potentially cause a desynchronization, but it's more likely that if there is a difference, it would be that it crashes on certain setups. Certain units, like Marines/Firebats/Ghosts/Zerglings, are very stable, whereas others are not (Hydralisks come to mind specifically, as they crash on Windows 7 but work fine on Windows XP).

The primary reason for crashing is because the unit is trying to display an illegal sprite frame. This most often happens when you enable the unit, which is why issuing an order to the unit (which updates their sprite frame) fixes the issue of crashing when the unit is looked at. Some units, like the Science Vessel, will still have illegal frames if they move in a certain direction, so they'll crash the game if you're looking at them while they move in that direction. Other units will have illegal frames regardless of their facing direction, meaning they cannot be useful for anything. Finally, some units will simply crash the game immediately when you attempt to enable them, regardless of whether or not you can see the sprite.

Finally, in the case of unit sprites, they generate a rock doodad sprite somewhere north of where you enable them. If you enable the unit sprite at the top of the map, the generated sprite will be off of the map, which can cause instability issues (it may cause the game to randomly crash several minutes into the game).

So, the trick is to disable/enable the unit in a hidden area on the map (for unit sprites, an area that isn't at the top edge of the map), and then issue an order so that it uses a valid sprite image. Once it has taken the action to move (~100ms is fine), it will be fine to use for any particular purpose.

I believe in the case of unit sprites, if you check the "disabled" flag on the unit properties and then enable it in-game, the unit will not be cloaked: it will just lose its collision. If you want it to also be cloaked, you have to disable and enable it again. I use this trick (in combination with another quirk that lets cloaked nonvisioned units look uncloaked) for the player-controlled Zerglings in Dash X and all of my Jog maps as a means to see where the other players are and what they're doing without them getting in your way (they can't block you and you can't accidentally click on them).

Someone was working on an updated list of doodad states for 1.16.1, but I forget who it was and what the status of their endeavor is.




Jul 22 2016, 8:08 pm Sie_Sayoka Post #12



Thanks for the super informative post. I've been fiddling with disabling things recently as I want to use certain visual effects for my map. The crashing does get tiresome though but I guess that's the price.



None.

Jul 23 2016, 3:53 am Oh_Man Post #13

Find Me On Discord (Brood War UMS Community & Staredit Network)

(in combination with another quirk that lets cloaked nonvisioned units look uncloaked)

Hey can this be used to uncloak a Dark Templar??




Jul 23 2016, 4:22 am Roy Post #14

An artist's depiction of an Extended Unit Death

Quote from Oh_Man
Hey can this be used to uncloak a Dark Templar??
Negative. The quirk is that forcibly cloaking a unit via the Set Doodad State action without providing vision for other players makes the sprite cloaked for the owner and appear uncloaked (but still behaviorally cloaked) to other players. If you reveal that unit (by enabling vision or bringing in a detector) and then revoke it, the unit will appear as cloaked for other players as well. Basically, as long as players never have vision to the unit, the unit sprite will appear not to be cloaked.

On the topic of unit sprites, since they have no shadows when you perform this trick (there might be another requirement to remove the shadow, such as burrowing, but I don't recall), if you were to reveal and hide them, they would be entirely invisible (as opposed to cloaked units such as Ghosts and Dark Templars, where you can kinda see them by their shadows even when they're cloaked). I did this trick on a Zergling as a proof of concept for controlling a Spider Mine here: http://www.staredit.net/332437/

Quote from Roy
The Zergling is what the Spider Mine is chasing. I just used a Sprite/DoodadState trick to make it virtually invisible. If you look at the "Hide Zergling" trigger, you'll see I'm enabling the sprite to remove its collision, disabling/enabling it to cloak it, giving vision to Player 1 and back to make it show as cloaked, and letting it burrow to remove its shadow. You can remove the give actions in that trigger to see the Zergling running away from the mine.


Post has been edited 2 time(s), last time on Jul 23 2016, 4:28 am by Roy.




Aug 8 2016, 9:22 pm rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

Hydralisks can be permanently cloaked via the arbiter trick, but you lose the cloak after burrowing, whereas disabled hydralisks will not lose cloak after burrowing. It might be possible to time the hydralisks to never crash on windows 7, but it's unlikely.

I worked a lot on "uncloaking" dark templar and methods of sharing vision without actually sharing fog of war vision. Every 100 frames, vision gets updated for all units on the map This is constant for everyone. This unfortunately means that if you are given a unit on frame 1, you have to wait 99 frames for the vision to update (which can be 4 seconds) to be able to get vision from that unit. You can abuse this so that shared vision is turned on for 98 frames and off for 2 frames. The result should be that all cloaked units will be revealed but they won't actually give any vision to the player. It's not perfect, as 1/30 units will blink in and out due to their detection order and a game limitation every 300 frames.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 9 2016, 12:08 am Sie_Sayoka Post #16



Speaking of cloaking Zerg units, I managed to get Zerglings and Hydralisks cloaked by the computer without an Arbiter. They were constantly burrowing and unburrowing due to the AI and it would sometimes create cloaked units. I'm unsure if this is a general bug for Starcraft as I've never seen it before or if it's specific to my map as I've done things like place p15 map revealers. I tried to recreate this effect with myself being in control of the units but it didn't work.



None.

Aug 9 2016, 5:19 am NudeRaider Post #17

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from rockz
Hydralisks can be permanently cloaked via the arbiter trick, but you lose the cloak after burrowing, whereas disabled hydralisks will not lose cloak after burrowing. It might be possible to time the hydralisks to never crash on windows 7, but it's unlikely.
IIRC disabled Hydralisks will always crash when they are facing straight south. So you can get them stable if you make sure they are always walking in a direction not south. If they stand still for a bit they start turning in random directions, including south. -> crash




Aug 9 2016, 8:19 am LoveLess Post #18

Let me show you how to hump without making love.

Quote from NudeRaider
Quote from rockz
Hydralisks can be permanently cloaked via the arbiter trick, but you lose the cloak after burrowing, whereas disabled hydralisks will not lose cloak after burrowing. It might be possible to time the hydralisks to never crash on windows 7, but it's unlikely.
IIRC disabled Hydralisks will always crash when they are facing straight south. So you can get them stable if you make sure they are always walking in a direction not south. If they stand still for a bit they start turning in random directions, including south. -> crash
The only version of cloaked hydralisks I have ever been able to make that will never crash require you to build them from a Larva unit sprite, sadly. Units made this way will retain their cloak (only one zergling, the second is created normally) and flying units retain their displacement mechanics.

Quote from Roy
I use this trick (in combination with another quirk that lets cloaked nonvisioned units look uncloaked) for the player-controlled Zerglings in Dash X and all of my Jog maps as a means to see where the other players are and what they're doing without them getting in your way (they can't block you and you can't accidentally click on them).

Never thought of actually using that weird interaction like that, being visible but not clickable, pretty neat. I just thought it was annoying and let them be detected so they were invisible.



None.

Aug 10 2016, 12:50 am rockz Post #19

ᴄʜᴇᴇsᴇ ɪᴛ!

Flying units DO lose their collision box, but this is only useful for air units by creating/moving units via triggers. If you center a location on a flying unit created in this way and create another flying unit, they will be placed on top of each other then begin to displace normally.

Quote from Sie_Sayoka
Speaking of cloaking Zerg units, I managed to get Zerglings and Hydralisks cloaked by the computer without an Arbiter. They were constantly burrowing and unburrowing due to the AI and it would sometimes create cloaked units. I'm unsure if this is a general bug for Starcraft as I've never seen it before or if it's specific to my map as I've done things like place p15 map revealers. I tried to recreate this effect with myself being in control of the units but it didn't work.
If a zerg unit unburrows as soon as it enters an arbiter's cloak range, it will stay cloaked until it burrows again. You can do this yourself in game. https://www.youtube.com/watch?v=Thc9dLQVQJA

To recreate the effect via triggers, I think you can create a burrowed unit, order it to unburrow by ordering it to move to the location, then create an arbiter on top of it. There should be some form of delay between the order and the arbiter creation, but I doubt it's much. It might even be unnecessary.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 10 2016, 2:54 am Sie_Sayoka Post #20



The thing is they were cloaked without an arbiter even on the map. They cloaked simply by unburrowing. The effect was identical to that produced using the arbiter trick as they lost cloak once they burrowed again. I can try and reproduce the effect in a test map if you're interested.

Also how long is 100 frames in terms of hyper trigger DCs?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: Roy, lil-Inferno, Ultraviolet, Oh_Man