Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How to handle "Cannot place unit error" with item drops?
How to handle "Cannot place unit error" with item drops?
Mar 3 2019, 9:41 pm
By: sethmachine  

Mar 3 2019, 9:41 pm sethmachine Post #1



Hi,

I have a trigger where when a player kills a certain unit, it drops a random item ("powerup"). This works by keeping a location centered on the boss, and when the boss dies the location is fixed to its death. Then I check that the boss isn't commanded anymore, and create a powerup at its location (where it died).

However, if the boss dies on a corner or against a wall, often times the powerup gets a "Cannot place unit error."

Is there a way to fix this without using EUDs? It is very important that the item drops where the boss died, because I want other players to be able to contest it or steal the drop.



None.

Mar 3 2019, 10:05 pm Roy Post #2

An artist's depiction of an Extended Unit Death

You could use a Mobile Grid to place the item near the boss if it's not possible to place directly where the boss died. This would work optimally if there aren't any air units in the vicinity. Something like this:

Spawn Item on Boss
Players

  • Player 8
  • Conditions

  • Player 8 has suffered at least 1 deaths of Boss.
  • Actions

  • Create 1 Powerup at 'SafeSpawnLocation' for Player 8.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Create 1 Zerg Scourge at BossLocation for Player 8.
  • Create 1 Protoss Observer at BossLocation for Player 8.
  • Create 1 Zerg Scourge at BossLocation for Player 8.
  • Create 1 Protoss Observer at BossLocation for Player 8.
  • Create 1 Zerg Scourge at BossLocation for Player 8.
  • Create 1 Protoss Observer at BossLocation for Player 8.
  • Create 1 Zerg Scourge at BossLocation for Player 8.
  • Create 1 Protoss Observer at BossLocation for Player 8.
  • Create 1 Zerg Scourge at BossLocation for Player 8.
  • Center location labeled 'BossLocation' on 'Protoss Observer' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Protoss Observer owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Protoss Observer' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Protoss Observer owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Protoss Observer' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Protoss Observer owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Protoss Observer' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Protoss Observer owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Zerg Scourge' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Zerg Scourge owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Zerg Scourge' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Zerg Scourge owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Zerg Scourge' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Zerg Scourge owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Zerg Scourge' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Zerg Scourge owned by Player 8 at 'BossLocation'.
  • Center location labeled 'BossLocation' on 'Zerg Scourge' owned by 'Player 8' at 'Anywhere'.
  • Move all Powerup for Player 8 at 'SafeSpawnLocation' to 'BossLocation'.
  • Remove 1 Zerg Scourge owned by Player 8 at 'BossLocation'.


  • Although you asked for a solution without using EUDs, there is an action built into the latest version of ScmDraft called "EUD: Location Position" that would be well-suited to the task of shifting the location around to find a valid place to move the unit onto. This removes the need to use a mobile grid to change the position of the location, and should be considered a superior option in just about every regard.




    Mar 3 2019, 10:28 pm Dem0n Post #3

    ᕕ( ᐛ )ᕗ

    You can also try creating the power-up somewhere else and then moving it to the boss's location. Though the item might not move to it if the location is completely off of a walkable area.



    Memes gather, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post. I am the sword in the darkness. I am the memer on the walls. I am the shield that guards the realms of memes. I pledge my life and honor to the Meme's Watch, for this meme and all the memes to come.

    Mar 3 2019, 11:44 pm sethmachine Post #4



    Quote from Roy
    [/T]

    Although you asked for a solution without using EUDs, there is an action built into the latest version of ScmDraft called "EUD: Location Position" that would be well-suited to the task of shifting the location around to find a valid place to move the unit onto. This removes the need to use a mobile grid to change the position of the location, and should be considered a superior option in just about every regard.

    Very creative non-EUD solution, thanks! I'm guessing hyper triggers players would barely notice the mobile grid.

    EUDs would be fine, except I believe you reach CCMU sooner if with EUD maps?

    Unless I'm mistaken.



    None.

    Mar 4 2019, 7:21 am Ultraviolet Post #5



    Indeed, extended unit limits are doubled, and you have to choose between extended unit limits and EUDs.




    Mar 4 2019, 1:07 pm NudeRaider Post #6

    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
    hyper triggers players would barely notice the mobile grid.
    It's all happening within one trigger. During the trigger phase the game is paused, so since the units are removed immediately, it does not wait until the next trigger loop. All that changes without hyper triggers is that the sequence may start a little later, its execution, is basically instant any way, though.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [05:59 pm]
    Pr0nogo -- NudeRaider
    NudeRaider shouted: NudeRaider Background: In music this has caused a loudness war, over the past decades where artists amplified their works more and more to sound more prominent than others. In this context it's actually perceived negative, because while for the untrained listener this creates a more effectful (because louder) piece, it actually destroys the finer details artists used to play very quietly. But because the latter is only appreciated by music enthusiasts with good stereo equipment, the former targets a larger audience and thus has proven more commercially successful.
    yeah this happens in all media now, sc2's sfx compared to sc1's is a good example of loudness war. also commercials/youtube ads being way louder than the content you're watching
    [05:42 pm]
    MasterJohnny -- Echo
    Echo shouted: My minerals still negative from Moose
    We should get minerals for logging for the day.
    [05:23 pm]
    jjf28 -- Echo
    Echo shouted: Did Crescent Dyne ever get finished
    :lol:
    [05:14 pm]
    Echo -- Did Crescent Dyne ever get finished
    [05:13 pm]
    Echo -- My minerals still negative from Moose
    [05:13 pm]
    Echo -- I joined 15 years ago and now I'm turning 29 tomorrow. Time zoomed by
    [05:12 pm]
    Echo -- What you guys still doing here
    [05:06 pm]
    NudeRaider -- NudeRaider
    NudeRaider shouted: SiKiN Don't wanna persuade you to do anything, Sikin, but Pronogo has a point. Uniformly lifting the wave form can only do so much (you noticed that you hit a ceiliing pretty early) but if you use a method that amplifies quiet component more than loud components the resulting perceived loudness will go up much quicker without hitting distortion.
    Background: In music this has caused a loudness war, over the past decades where artists amplified their works more and more to sound more prominent than others. In this context it's actually perceived negative, because while for the untrained listener this creates a more effectful (because louder) piece, it actually destroys the finer details artists used to play very quietly. But because the latter is only appreciated by music enthusiasts with good stereo equipment, the former targets a larger audience and thus has proven more commercially successful.
    [05:01 pm]
    NudeRaider -- SiKiN
    SiKiN shouted: Yea cheers but I think I'll land on 20db, hes fine how he is.
    Don't wanna persuade you to do anything, Sikin, but Pronogo has a point. Uniformly lifting the wave form can only do so much (you noticed that you hit a ceiliing pretty early) but if you use a method that amplifies quiet component more than loud components the resulting perceived loudness will go up much quicker without hitting distortion.
    [03:03 pm]
    Zycorax -- :wob:
    Please log in to shout.


    Members Online: Pandut, Roy