Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Strange Mobile Grid Problems
Strange Mobile Grid Problems
May 2 2010, 9:42 pm
By: VoidMage_Lowell  

May 2 2010, 9:42 pm VoidMage_Lowell Post #1



So, I've been having this issue with Mobile Grids....
I'm pretty sure it's got something to do with the offset glitch, but I can't get it to correct.
I'm only asking here because I've followed the Wiki Article to the letter without avail, and I can't use the Search Button, because it's apparently been disabled right now...

Anyways, what is basically suppose to happen is this:
Whenever the player builds a Marine, a trigger runs that creates a Mobile Grid on the hero. The Grid is suppose to surround him in a square of 8 Burrowed Defilers, one in each major direction.
Quote from name: the Trigger for the Defilers spawn
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
Bring("Current Player", "Alexei Stukov (Ghost)", "Arena", Exactly, 1);
Bring("Current Player", "Terran Marine", "Spell Detection", Exactly, 1);
Switch("Sundown's Spells 1", not set);

Actions:
Set Switch("Sundown's Spells 1", set);
Set Deaths("Current Player", "Zerg Defiler", Set To, 0);
Preserve Trigger();
Comment("Sundown - Single Shot - Aim ///Old");
Move Unit("Current Player", "Alexei Stukov (Ghost)", All, "Arena", "STOP MOVING");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Steady Aim");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Location");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 3, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 9, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 3, "Arena");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 9, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Create Unit with Properties("Player 7", "Zerg Defiler", 9, "Pre-Spawn Container", 2);
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Pre-Spawn Container");
Remove Unit At Location("Player 7", "Zerg Defiler", All, "Pre-Spawn Container");
Remove Unit At Location("Player 7", "Zerg Defiler", All, "Sundown's Devourer Checker");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Devourer Checker");
Set Invincibility("Player 1", "Zerg Defiler", "Sundown's Devourer Checker", disabled);
Now, that's just for the 'aiming'.
Another trigger waits until the Hero shoots one of the defilers.
Once he does, it checks which one has been killed, and then fires a line of wraiths in that direction.
I'll only give the trigger for the checking, since the triggers for spawning the line of wraiths work fine and will only take up needless room.
Quote from name:the Trigger for Firing
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
Bring("Current Player", "Alexei Stukov (Ghost)", "Arena", Exactly, 1);
Bring("Current Player", "Terran Marine", "Spell Detection", At least, 1);
Switch("Sundown's Spells 1", set);
Deaths("Current Player", "Zerg Defiler", At least, 1);
Deaths("Current Player", "Zerg Defiler", At most, 10);

Actions:
Preserve Trigger();
Comment("Sundown - Single Shot - Direction Check ///Old");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Devourer Checker");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Steady Aim");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Location");
Create Unit with Properties("Player 7", "Zerg Devourer", 3, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Arena");
Create Unit with Properties("Player 7", "Zerg Devourer", 9, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 3, "Arena");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Arena");
Create Unit with Properties("Player 7", "Zerg Devourer", 9, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Bottom Left");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Bottom Left");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Left");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Left");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Top Left");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Top Left");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Top");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Top");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Bottom");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Bottom");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Top Right");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Top Right");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Top Right");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Top Right");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Right");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Right");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Aim Bottom Right");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Aim Bottom Right");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Pre-Spawn Container");
Now, these triggers work fine. 90% of the time.
The problem is when the Hero is apparently on a sub-tile...
Now, I know the fix for that Offset Glitch is to use a Partial Grid first before using the main one, and if you look through the previous two triggers I did that both times.
But it's not working...
Here's a Screenie of a successful run:

As you can see, all 8 spawned in their proper places.
If I shoot any of them, the proper line of wraiths will spawn.
Now, here's a screenie of it not working, notice it only happens when I'm at the corner of four squares...:

See, one of the Defilers has spawned under the Hero now.
The trigger to check which Defiler has been killed is also a bit screwed up. If I shoot the top Defiler, the wraith line starts at the top, but goes down instead of up...
If I shoot the middle, the wraith line just becomes a constant explosion on the hero. {Until it runs out, anyways}

I've been following the Wiki Article, but I just can't seem to fix it...
It seems to me that, for some reason, whenever I'm at that particular sub-tile, the middle row of Devourers {Which is the air unit spawned for the Mobile Grid} gets mixed up.
Usually, the priority for killing the Devourers is:
Quote
3 4 7
2 6 8
1 5 9
But it looks like the middle row gets mixed up, into something like
Quote
3 5 7
2 4 8
1 6 9

What am I doing wrong? I just can't figure it out and it's driving me nuts >.>;



None.

May 2 2010, 11:30 pm Cinolt Post #2



If you post the map I could probably find the problem easier, so I could see the locations, and the classic trigedit is a bit easier to understand.



None.

May 2 2010, 11:43 pm VoidMage_Lowell Post #3



Well, I really wanted to avoid doing that, but I guess there's no reason to...
Map's attached, the triggers are under Player's 1 through 6, under " ~Sundown". The two I listed in the first post are named "Sundown - Single Shot - Aim" and "Sundown - Single Shot - Directional Check", in that order.
Ignore the '///New' ones, I was trying a different approach, which failed horribly. Just look at the '///Old' ones. Every trigger with "Single Shot" is apart of the same 'move', too.
If you're going to try testing it yourself, make sure to pick Free for All {Xel'Naga Temple} and then Sundown {Alexi}. Build a Marine to start the move.
Thanks for any help...

Post has been edited 1 time(s), last time on May 3 2010, 2:16 am by VoidMage_Lowell. Reason: Remove attachment



None.

May 3 2010, 12:19 am Roy Post #4

An artist's depiction of an Extended Unit Death

The offset isn't the problem, and I'm fairly sure that the issue that occurs isn't only when you're on the corner of a tile. The offset just means that your grid may be slightly shifted from the original point, but it wouldn't cause the problem you're having. I looked at your triggers and I just got lost with all of the extra Devourer placements and such.
Quote
Create Unit with Properties("Player 7", "Zerg Devourer", 3, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Sundown's Devourer Checker");
That part right there makes my head explode. What's it supposed to do? It moves 3 Devourers onto the unit, and then moves "Sundown's Location" on the Devourer below the unit? I'd say it's safe to disable those lines.

Do not open





May 3 2010, 12:29 am VoidMage_Lowell Post #5



Quote from Roy
The offset isn't the problem, and I'm fairly sure that the issue that occurs isn't only when you're on the corner of a tile. The offset just means that your grid may be slightly shifted from the original point, but it wouldn't cause the problem you're having. I looked at your triggers and I just got lost with all of the extra Devourer placements and such.
Quote
Create Unit with Properties("Player 7", "Zerg Devourer", 3, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Sundown's Devourer Checker");
That part right there makes my head explode. What's it supposed to do? It moves 3 Devourers onto the unit, and then moves "Sundown's Location" on the Devourer below the unit? I'd say it's safe to disable those lines.
That's the Partial Grid part. It's suppose to move the grid away from the Hero and then back on him.
It fixes the Offset Glitch.
Quote from name:Location Grid Wiki
The Offset Glitch

If a grid is created incorrectly, even if following all the instructions and precautions, one is most probably experiencing the Offset Glitch.

The Offset Glitch often occurs when the Mobile grid is created at a unit that can move around (like a hero in an RPG). Please note that the unit's motion does not cause the glitch by itself, it is the unit's position that causes it.

SC divides each tile into 4 equal square segments or subtiles. These subtiles are equivallent to the fine grid in the editor. The first unit of the Mobile grid is always created directly at the specified location, however, all the following units are created centered on the nearest fine grid point (where subtiles' corners meet). Hence, if the grid center is not on one of the fine grid points, the grid units are created incorrectly, thus ruining the grid.

To prevent this, first use a Partial grid to move the center one grid point south (down) or south-west (bottom-left). After this, the new grid center will be without any offset, thus one can use a Mobile grid to move the grid center back. This will result in the grid center being centered on the subtile grid without offsets, hence allowing you to use Mobile grids normally from that point.
I tried south, and it didn't work, so I tried adding a bit more to go to the bottom right, and it still didn't help.

And yeah, the first trigger's probably ineffective, but that's not the problem.
The second one does what you just said, and it still suffers from the weird problem too; the Wraiths will fire in messed up directions if you're standing on a corner...

Post has been edited 1 time(s), last time on May 3 2010, 12:31 am by VoidMage_Lowell. Reason: Empasis



None.

May 3 2010, 12:35 am Apos Post #6

I order you to forgive yourself!

When troubleshooting yourself, all you need to do is make your triggers go slowly. Test with the first part only, then test with everything but don't remove the devourers at the end. Try anything that could help you find out what you did wrong.




May 3 2010, 12:54 am Cinolt Post #7



The offset glitch fix is at fault; use this instead:

Quote
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
Bring("Current Player", "Alexei Stukov (Ghost)", "Arena", Exactly, 1);
Bring("Current Player", "Terran Marine", "Spell Detection", Exactly, 1);
Switch("Sundown's Spells 1", not set);
; Never();

Actions:
Set Switch("Sundown's Spells 1", set);
Set Deaths("Current Player", "Zerg Defiler", Set To, 0);
Preserve Trigger();
Comment("Sundown - Single Shot - Aim ///Old");
Move Unit("Current Player", "Alexei Stukov (Ghost)", All, "Arena", "STOP MOVING");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Steady Aim");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Location");
Move Location("Current Player", "Alexei Stukov (Ghost)", "Arena", "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 1, "Pre-Spawn Container", 1);
Create Unit with Properties("Player 8", "Zerg Devourer", 1, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Unit("Player 8", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 8", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("All players", "Zerg Devourer", All, "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 5, "Pre-Spawn Container", 1);
Create Unit with Properties("Player 8", "Zerg Devourer", 1, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Unit("Player 8", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 8", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("All players", "Zerg Devourer", All, "Sundown's Devourer Checker");
Create Unit with Properties("Player 7", "Zerg Devourer", 9, "Pre-Spawn Container", 1);
Move Unit("Player 7", "Zerg Devourer", All, "Pre-Spawn Container", "Sundown's Location");
Create Unit with Properties("Player 7", "Zerg Defiler", 9, "Pre-Spawn Container", 2);
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Move Location("Player 7", "Zerg Devourer", "Arena", "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", 1, "Sundown's Location");
Move Unit("Player 7", "Zerg Defiler", 1, "Pre-Spawn Container", "Sundown's Location");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Location");
Remove Unit At Location("Player 7", "Zerg Devourer", All, "Pre-Spawn Container");
Remove Unit At Location("Player 7", "Zerg Defiler", All, "Pre-Spawn Container");
Remove Unit At Location("Player 7", "Zerg Defiler", All, "Sundown's Devourer Checker");
Give Units to Player("Player 7", "Current Player", "Zerg Defiler", All, "Sundown's Devourer Checker");
Set Invincibility("Player 1", "Zerg Defiler", "Sundown's Devourer Checker", disabled);
}

You need to update the other trigger as well to get it to work, just fix it in the same manner as this one.



None.

May 3 2010, 2:17 am VoidMage_Lowell Post #8



Ah, thanks a lot yoonkwun!
It works fine now.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:15 am]
DarkenedFantasies -- you eat lots of beans
[03:46 am]
IskatuMesk -- how do i get gas
[11:43 pm]
Moose -- you don't
[10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
[2026-4-13. : 9:14 pm]
ClansAreForGays -- anticapitalism isnt edgy anymore
Please log in to shout.


Members Online: Zycorax