Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Disabled state for stacked unit
Disabled state for stacked unit
Apr 6 2017, 7:27 pm
By: Matt.-  

Apr 6 2017, 7:27 pm Matt.- Post #1

CCSM, PCNSE7

Hello everyone.

My question isn't necessarily a troubleshooting question but more about the limitations/considerations for using a disabled sprite for stacked units. I understand the process for this is, generally, as follows: (Sidenote: I'm having issues accessing the Wiki, is this down?)



In SCMDraft2, place Unit Sprites for [unit] and Disable via Unit Sprite properties.

StackedUnit
Players

  • Player X
  • Conditions

  • Always
  • Actions

  • Enable Doodad State for [unit] at [locunit]
  • wait [0ms]
  • Order [unit] for [Player X] to at [locunit], [move] to [destloc]


  • This unit can now stack on other units.


    My questions:
    - What are the limitations of this? Is there a maximum amount of stacked units that can be generated by this per game? per player?
    - This generates a rock doodad above the sprite in game. If the sprite is placed at the top of the map, will the rock doodad be unplaceable and therefor crash the game?
    - Lets say, for example, I want player 7 to have 20 stacked units. Can I simply place 20 sprites and use the same trigger for each sprite?
    - I understand that placing the sprite as disabled is different than placing the sprite and then using triggers to disable the sprite, is this also correct?


    Thanks for the feedback and always appreciate any input



    Latest Completed Projects:
    Dodge & Attack
    Stacked Marine D

    Apr 6 2017, 7:43 pm NudeRaider Post #2

    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

    It's been a long since time I've dabbled with these kinds of questions, but I'll answer what I can.

    Firstly: Yeah we're having server issues. Running too long without maintenance will do that. :/ But we're in the process of gradually improving things. Just hang on, and be patient on the page loadings in the meantime. :ohno:

    - Afaik there's no numerical limitations of the number of stacked sprites. But you can't look at it while it's being created. Also there's a couple of units that don't immediately crash, but will crash if their unit graphic hits a certain frame. E.g. hydra looking south. You're safe as long as you can avoid those, or use units that don't crash.

    - Seems easy enough to test, right?

    - You can use the same trigger, but you have to disable them 1 by 1 and only one every so often (I think per trigger loop?)

    - really sketchy memory, but iirc, yes. I can't remember any details.




    Apr 6 2017, 9:44 pm LoveLess Post #3

    Let me show you how to hump without making love.

    Quote from Matt.-
    - What are the limitations of this? Is there a maximum amount of stacked units that can be generated by this per game? per player?
    The only limitation is the sprite limit, which is 499. However with that being said it is wise to limit yourself to 250 due to the technical limitations of the game.
    Quote from Matt.-
    - This generates a rock doodad above the sprite in game. If the sprite is placed at the top of the map, will the rock doodad be unplaceable and therefor crash the game?
    No the rock sprite will be adjusted to fit the map. It will always get placed.
    Quote from Matt.-
    - Lets say, for example, I want player 7 to have 20 stacked units. Can I simply place 20 sprites and use the same trigger for each sprite?
    Yep!
    Quote from Matt.-
    - I understand that placing the sprite as disabled is different than placing the sprite and then using triggers to disable the sprite, is this also correct?
    So the difference between simply enabling the disabled sprite and disabling, THEN enabling an already disabled sprite, is that the latter will be cloaked. Now if you place a unit sprite that is not already disabled, you will start having problems, just place them disabled. When I first tested this all out the working units were Marines, Firebats, Ghosts, Dark Templar, Zerglings, Larva, and Civilians. Their hero versions work as well, obviously. That all being said, Hydralisk and Zealots can work but are unstable. Then all units made by the larva (not including buildings) are also stackable (cloaked if the larva was). If you make Zerglings or Scourge though, one of each will not be a sprite.

    My advice is to just make a section of the map unavailable for view by the players where you can have your triggers going off and sprites getting enabled. Then store them somewhere in that area. These two methods will ensure that your map never crashes due to the bugs surrounding unit sprites, suggesting you are not trying to disable ones other than what I have listed.

    Post has been edited 1 time(s), last time on Apr 6 2017, 9:50 pm by LoveLess.



    None.

    Apr 8 2017, 5:12 pm Roy Post #4

    An artist's depiction of an Extended Unit Death

    Quote from LoveLess
    Quote from Matt.-
    - This generates a rock doodad above the sprite in game. If the sprite is placed at the top of the map, will the rock doodad be unplaceable and therefor crash the game?
    No the rock sprite will be adjusted to fit the map. It will always get placed.
    Actually, the rock sprite will be generated outside of the map boundaries (and thus not visible), and it does cause stability issues. In my experience, the game doesn't crash immediately, but it can cause a crash randomly as time goes on.

    For this reason, don't enable unit sprites near the top border of the map.

    Quote from Matt.-
    - I understand that placing the sprite as disabled is different than placing the sprite and then using triggers to disable the sprite, is this also correct?
    The rundown:

    Normal unit: visible, collision
    Normal unit, trigger disabled-enabled-ordered: cloaked, collision

    Sprite unit: visible, collision
    Sprite unit, trigger disabled-enabled-ordered: cloaked, collision, rock sprite generated

    Disabled sprite unit, trigger enabled: visible, no collision, rock sprite generated
    Disabled sprite unit, trigger enabled-disabled-enabled-ordered: cloaked, no collision, rock sprite generated




    Aug 27 2017, 7:22 pm O)mG Post #5



    Any change on the behavior of unit sprites? I never crash when using these to stack units in my defense map but 50% of people crash every single time... Any thoughts?



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:19 am]
    Linekat -- cool
    [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
    Please log in to shout.


    Members Online: IlyaSnopchenko, Linekat