Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Mobile Grids/Move Actions/Walkable Terrain
Mobile Grids/Move Actions/Walkable Terrain
Feb 9 2009, 10:54 am
By: Elvang  

Feb 9 2009, 10:54 am Elvang Post #1



Currently I know how to 'snapto' the nearest ¼x¼ tile thanks to my previous thread concerning the creation and removal/give order in mobile grids. The problem is aligning the direction locations before moving the unit via trigger such that if the destination tile is walkwable and next to an unwalkable tile, the unit will teleport without becoming frozen 100% of the time.

I've tried creating a spider mine at the destination location, then centering the location on it before removing the mine. In addition, I've also tried using burrowed units placed in the center of tiles around the outside of the map along with 1 pixel wide x/y locations following the unit, not allowing it to teleport unless it lines up with a burrowed unit.

The P12 unit is the origin, and the P2 unit is the destination. Case A will teleport all the time, while Case B will cause the unit not to teleport but instead freeze, neither of the above methods had any effect.


Also attached is a map for easy testing of any ideas you may have, if you'd rather test them before posting.



None.

Feb 9 2009, 12:10 pm rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

Obviously, when you go to the far right, the grid seems to fail and moves one pixel to the right, which makes it impossible to create/move a unit of equal or greater size as a marine. It also may have to do with the way starcraft handles the sides of unwalkable tiles. Since locations always center on the center of the unit, you'll need to displace it somehow. This seems like an inherent flaw in SC. If you could somehow get a jimmy marine to be created, centered, removed, you'd be fine, but Jimmy comes up with unit unplaceable errors.

What you can do is check to see if the unit has actually moved. If the unit wasn't moved, temporarily turn off the screen shifts via dc, then turn them back on when the marine has moved at least a pixel. It's a suboptimal fix, but the only one I can think of.



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

Feb 9 2009, 2:09 pm Elvang Post #3



Alright, problem solved as far as I can tell... When I check if the grid needs to be made I added a set dc to 2 and a condition that requires that dc to be 0. The grid is then made and the unit moved as normal. Then I added a timer that decreases the dc by 1 every cycle. After that is the antifreeze trigger, it checks if the player isn't at any of the 4 direction locations and that the dc is at 1. If the checks pass, then it shifts the grid left by 1 devourer, and I recreate it shifted back right by 1 scourge. The player's unit is ordered to the new grid location, and since the dc is still at 1 it won't try to teleport for one trigger cycle, giving the unit enough time to move a few pixels. This method doesn't require any help from the player to get the unit where it needs to go. The updated map is attached, added a few more varieties of terrain to test it thoroughly.

Attachments:
Movement.scx
Hits: 4 Size: 61.24kb

Post has been edited 1 time(s), last time on Feb 9 2009, 2:30 pm by Elvang.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
Please log in to shout.


Members Online: UndeadStar, Excalibur