Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Problem with grids
Problem with grids
Jul 18 2008, 10:48 pm
By: M s4  

Jul 18 2008, 10:48 pm M s4 Post #1



I'm trying work with a mobile grid and did a simple test.

Location 9 is a 6x6 location.
Location 10 is a 2x2 location.

Here is my trigger:
Code
    Create Unit("Player 2", "Zerg Mutalisk", 9, "Location 9");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Kill Unit At Location("Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Move Location("Player 3", "Zerg Mutalisk", "Location 9", "Location 10");
    Wait(1000);
    Create Unit("Player 1", "Uraj Crystal", 1, "Location 10");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Kill Unit At Location("Player 3", "Zerg Mutalisk", 2, "Location 9");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Move Location("Player 3", "Zerg Mutalisk", "Location 9", "Location 10");
    Wait(1000);
    Create Unit("Player 1", "Khalis Crystal", 1, "Location 10");
    Wait(1000);
    Kill Unit At Location("Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Move Location("Player 3", "Zerg Mutalisk", "Location 9", "Location 10");
    Wait(1000);
    Create Unit("Player 1", "Khaydarin Crystal", 1, "Location 10");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 2, "Location 9");
    Wait(1000);
    Kill Unit At Location("Player 3", "Zerg Mutalisk", 3, "Location 9");
    Wait(1000);
    Give Units to Player("Player 2", "Player 3", "Zerg Mutalisk", 1, "Location 9");
    Wait(1000);
    Move Location("Player 3", "Zerg Mutalisk", "Location 9", "Location 10");
    Wait(1000);
    Create Unit("Player 1", "Zerg Zergling", 1, "Location 10");
    Wait(1000);
    Kill Unit At Location("All players", "Zerg Mutalisk", All, "Location 9");

I run it and I get this:



Now I added the waits to observe what was going on. But when I remove the waits, I get this.



Does anyone know what is wrong with it?



None.

Jul 18 2008, 10:51 pm Falkoner Post #2



Why don't you just remove the unit to begin with, rather than giving it, then removing it? Try doing that and see if it fixes it. Right now it looks like it is centering on a non-existent unit, so they all just get created in the middle of the large location. Also, try making the location larger than it needs to be, sometimes the units get placed weirdly because there is no room inside the location for them.



None.

Jul 19 2008, 12:00 am M s4 Post #3



That does not explain why removing waits makes the trigger behave differently.



None.

Jul 19 2008, 12:09 am Atlos Post #4



Try replacing the "Kill Unit" with "Remove Unit". If it works then I'll post an explanation.



None.

Jul 19 2008, 1:43 am M s4 Post #5



Changing Kill Unit to Remove Unit did the trick. If you are too bothered to explain why you don't need to, unless not knowing why could potentially screw me up later.



None.

Jul 19 2008, 1:52 am Atlos Post #6



It's no problem to explain. I just didn't want to write an explanation and have it turn out to be wrong. :P

Anyways, when you use "Kill Unit" it takes a trigger cycle for the unit to be considered gone. Using waits will refresh the trigger cycle which is why it worked originally. So to breakdown what was happening, you would kill the first mutalisk and then try to center on the second. What was really happening was that the first mutalisk was still considered there, and the location was centering on where it used to be. So in the end, all of the locations you centered ended up being centered in the exact same spot which is why your crystals were all messed up. Powerups can be created over units, so when you created the powerup at the location it was pushed to the side instead of giving you the unplaceable error.

Also, what's strange is that the following triggers would work on a map that has only 1 marine placed on it:
Quote
Always
-------
Kill All marine at anywhere for current player

Current Player brings at least 1 marine to anywhere
----------
Create 1 Firebat at location anywhere
While the following trigger series would not work:

Quote
Always
-------
Remove All marine at anywhere for current player

Current Player brings at least 1 marine to anywhere
----------
Create 1 Firebat at location anywhere
Lazy Blizzard programming. :P



None.

Jul 19 2008, 4:59 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

There's a whole bunch of finicky trigger commands (like the difference between command and bring, remove and kill, etc...) You might try "give unit" as well, since I think that's instant. When something behaves erratically like this, it's best to test it out in a separate map to see what is really happening. Hopefully, the wiki has some data on it too.



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

Jul 19 2008, 6:38 pm M s4 Post #8



What is the difference between command and bring?



None.

Jul 20 2008, 3:50 am Falkoner Post #9



Command is updated slightly slower than bring is. And bring can be at any location, command basically means the entire map, also, command can detect some things that bring can't, such as comsat sweeps.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:50 am]
O)FaRTy1billion[MM] -- ya
[2026-10-14. : 3:20 am]
Symmetry -- Dang I'm up to 155 minerals gambling really pays off guys
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[2026-10-09. : 1:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
Please log in to shout.


Members Online: LoveLess, Roy