Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Help: Unit Spawning Problem
Help: Unit Spawning Problem
Oct 17 2008, 4:54 am
By: Lucky.307  

Oct 17 2008, 4:54 am Lucky.307 Post #1



I have a few triggers that say
Conditions
"Player 1 bring 1 _______ to ______"
Action
"Create 1 _______ for Player 5 at _________"

However when this happens it creates 2 of that unit. It happens on all the triggers that create 1 unit at any location. Is it because of hyper triggers? If so, how do I fix that?



None.

Oct 17 2008, 5:28 am Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

maybe 2 players run this trigger -> 2 units will be created




Oct 17 2008, 5:38 am Falkoner Post #3



You definitely checked the trigger for more than one player, if you only want it created once, only check one player, for every player you check, another copy of the trigger is given to them, so if the conditions remain true, it will run for as many players as you check.



None.

Oct 17 2008, 5:39 am Lucky.307 Post #4



In one case it is suppose to create 2 units. Even though each unit goes to a different player. However in multiple other cases, it has to create one marine at on location for player 7 but it creates two instead. I've looked over the trigger many times but it still spawns 2 even though it clearly states 1 unit is supposed to spawn.



None.

Oct 17 2008, 5:41 am Lucky.307 Post #5



So since I have players 5 and 6 checked it executes the trigger twice and creates one player 7 marine for player 5's trigger and one player 7 marine for player 6's trigger?

Whenever I did this before it didn't seem to do this.



None.

Oct 17 2008, 6:41 am Falkoner Post #6



The reason it didn't do it before was most likely because the conditions were no longer true once one of the triggers ran, in this case, obviously that is not true. It's not to difficult to make it true though.



None.

Oct 17 2008, 6:45 am NudeRaider Post #7

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

Yes, that's the problem.
Depending on what you are trying to do there's a couple ways to prevent it.
The most elegant way, if applicable, is to use Current Player:

Force 1
Conditions:
Current Player brings at least 1 <unit> to X
Actions:
Create 1 <unit> for Player Y at Z

This way the trigger will only run for the person owning the unit.

Another good way is to make the condition untrue:
Force 1
Conditions:
Player 1 brings at least 1 <unit A> to X
Actions:
Create 1 <unit B> for Player Y at Z
Move <unit A> at X to X2

OR:
Force 1
Conditions:
Switch 1 is cleared
Player 1 brings at least 1 <unit A> to X
Actions:
Create 1 <unit B> for Player Y at Z
Set Switch 1

Often it also helps to give the trigger to a single owner, like a comp. Especially useful if it's the receiver of the new unit:
Player Y
Conditions:
Force 1 brings at least 1 <unit A> to X
Actions:
Create 1 <unit B> for Current Player at Z

Of course there's dozens of other ways to prevent this, but the above triggers cover the most common ones. I just wanted to show you some practical solutions and with a bit of thinking I'm sure you can modify one of these to fit into your map.
Good luck!

Post has been edited 3 time(s), last time on Oct 17 2008, 7:09 am by NudeRaider.




Oct 17 2008, 6:53 am Falkoner Post #8



You have to be careful with making the conditions false using a bring command, some actions will not update the bring command, so the condition will still remain true, even if physically it is not, here's a list of actions that do instantly update the bring command:

Code
Kill Unit
Kill Unit at Location
Remove Unit
Remove Unit At Location
Move Location
Move Unit




None.

Oct 17 2008, 6:58 am NudeRaider Post #9

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

Yes, that means if you move the unit out of the location you're fine, but if you just give the unit to another player sc doesn't detect it instantly and the trigger might run again for the next player.

Also be careful with kill unit. Units don't die instantly (while remove is). During the death animation they still can be detected.




Oct 17 2008, 8:49 am Ahli Post #10

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from NudeRaider
...but if you just give the unit to another player sc doesn't detect it instantly and the trigger might run again for the next player.
That problem really confused me in my D1 item swapping triggers because I thought it was updated instantly with give. I fixed it centering anywhere on anywhere.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-6-26. : 10:31 am]
NudeRaider -- blessed innocent soul knows nothing of the strife we had before EUDs were discovered :teehee:
[2026-6-23. : 3:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[2026-6-22. : 8:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
Please log in to shout.


Members Online: NudeRaider