Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Keeping Buildings Unlifted
[SOLVED] Keeping Buildings Unlifted
This topic is locked. You can no longer write replies here.
Jun 15 2012, 3:33 am
By: IAGG  

Jun 15 2012, 3:33 am IAGG Post #1



Ok so bottom line is im trying to minimize the amount of locations to use for keeping some terran buildings from lifting. There will be 6 human players and 2 computer players. There will be the upgrades section which consists of 1 Engineering Bay, 1 Barracks, 1 Science Facility for each player. I tried using just 2 locations; 1 for the entire upgrades location to detect if a building was in the air, and the other to move to the lifted building to move it to the same location which would make it unlifted. The issue i came accross was that when the building is being moved, it was moving up one normal grid block. Is there a method anyone can help me with that will allow me to keep the buildings from being lifted, or to land the buildings instantly without them waiting till they are fully lifted. If you need more info just let me know. I would prefer not having a location at each building... roughly 18 locations...
thx



None.

Jun 15 2012, 4:12 am Roy Post #2

An artist's depiction of an Extended Unit Death

If you have them lined up, you can use the technique used for location grids to center the location to the appropriate area.

For example, if all the buildings are 10 tiles from the top of the map, make a location that is 10*2+1.5 = 21.5 tiles tall (distance from edge times two, plus half the height of the building). When you center the location on the lifted building, the top edge of the map "pushes" the location so that its center is actually at the center of where the building originally was before it lifted.

Alternatively, you can put a location on the tile immediately above the buildings, and the instant they touch that location (i.e., they've started to lift off), move a location on the building. This will work much faster than detecting a full lift of the building, so it may work for you just fine.




Jun 15 2012, 4:19 am IAGG Post #3



ok well the buildings are lined up but they are also overlaping slightly. a player is able to lift 1 building and then land it in the same spot. but if they lift a barracks and an engineering bay, they only have room to land one of them. ive never tried to use a mobile grid before and would like to avoid that if its possible. if not then ill try to learn it. on a side note... is it possible to just disable the lift option?



None.

Jun 15 2012, 4:22 am jjf28 Post #4

Cartography Artisan

If you are only using science facilities to ease ups 2-3 and/or to aid unit creation, then you can use a disabled unit sprite, it will be unable to lift; you will not be able to perform emp/irrad/energy upgrades from it.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 15 2012, 4:26 am Roy Post #5

An artist's depiction of an Extended Unit Death

You can disable lift through some impractical implementations (disabled/incomplete buildings).

Location grids aren't the same as mobile grids, and you wouldn't be implementing a grid, anyway. I was just referring to the technique location grids use to function.

Basically, when you center a location somewhere, SC makes sure its boundaries do not leave the map. So if you centered a 10x10 location in the top left corner (0x0), the center of that location wouldn't be the top left, but rather it would be at 5x5. By creating a really long location, you can basically force its center to be wherever you want it to be (assuming what you're centering it on is on the correct side of the map).

If you'd like, I can make sample maps for these two implementations.




Jun 15 2012, 4:29 am IAGG Post #6



Quote from Roy
You can disable lift through some impractical implementations (disabled/incomplete buildings).

Location grids aren't the same as mobile grids, and you wouldn't be implementing a grid, anyway. I was just referring to the technique location grids use to function.

Basically, when you center a location somewhere, SC makes sure its boundaries do not leave the map. So if you centered a 10x10 location in the top left corner (0x0), the center of that location wouldn't be the top left, but rather it would be at 5x5. By creating a really long location, you can basically force its center to be wherever you want it to be (assuming what you're centering it on is on the correct side of the map).

If you'd like, I can make sample maps for these two implementations.

Thank you. i would like to be able to see the triggers and the effects if you dont mind.

Edit: just to remember the science facility will have the covert ops attached which will eventually allow ghost range. The barracks will be allowing the building of all units and the engineering bay will be used for upgrades. they will be starting at 0 as well**



None.

Jun 15 2012, 4:39 am jjf28 Post #7

Cartography Artisan

If you need to re-stack buildings, there's a cool trick:

1. Create a random unit somewhere
2. Move the random unit to the location you want to stack at
3. Create the unit you want to stack somewhere
4. Remove the random unit
5. Move the created unit to the stack location

^ All in one trigger cycle



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 15 2012, 4:43 am Roy Post #8

An artist's depiction of an Extended Unit Death

I made a quick map and realized the second option I suggested doesn't work fast enough to get the effect you want. Option #1 it is.

As I'm sure you have in your own location, the "Area" location in the attached map only has the air flags selected.

Edit: Based on your current implementation, I'd say you don't need to change any triggers; you just need to change the size of the location you're moving.

Post has been edited 1 time(s), last time on Jun 15 2012, 4:54 am by Roy.




Jun 15 2012, 4:55 am IAGG Post #9



Quote from Roy
I made a quick map and realized the second option I suggested doesn't work fast enough to get the effect you want. Option #1 it is.

As I'm sure you have in your own location, the "Area" location in the attached map only has the air flags selected.

ok so i checked out the map. *thx for showing me*. for starters, all the terraining is done for the map and the upgrades section is relatively bottom right. so lets say i have all the barracks for each player lined up horizontally like each building in your map. and then a row for facilities and bays. would i need 3 locations, one for each row? because if im grasping this correctly, they would need to be slightly different sizes since they are about 2~3 tiles vertically



None.

Jun 15 2012, 4:56 am jjf28 Post #10

Cartography Artisan

ah yes, one more thing, covert ops don't require a science facility; pre-placed covert ops will continue to be owned by the assigned player. The owner can be changed with a semi-complicated trick, but not simply by the "give" trigger.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 15 2012, 4:57 am IAGG Post #11



This is a pic of what it will look like. Sorry i dont know how to add images directly...

Attachments:
Upgrades Location.jpg
Hits: 9 Size: 86.72kb



None.

Jun 15 2012, 4:58 am Roy Post #12

An artist's depiction of an Extended Unit Death

Quote from IAGG
so lets say i have all the barracks for each player lined up horizontally like each building in your map. and then a row for facilities and bays. would i need 3 locations, one for each row? because if im grasping this correctly, they would need to be slightly different sizes since they are about 2~3 tiles vertically
Yes, you would need locations with different heights if you have different rows. The size of the location is based on how far away the building is from the edge of the map.

Based on your image, you would need five locations total (1 for each row and 1 for the whole area).




Jun 15 2012, 4:58 am IAGG Post #13



Quote from jjf28
ah yes, one more thing, covert ops don't require a science facility; pre-placed covert ops will continue to be owned by the assigned player. The owner can be changed with a semi-complicated trick, but not simply by the "give" trigger.

Ok so for the science facilities, i would be able to disable them and the covert ops will still work. and the player will still be able to use upgrades from 1-3???



None.

Jun 15 2012, 5:03 am jjf28 Post #14

Cartography Artisan

Quote
Ok so for the science facilities, i would be able to disable them and the covert ops will still work. and the player will still be able to use upgrades from 1-3???

Yes, that is the gist of it; but to be perfectly clear, disabled like this, not by "disable doodad state"

Collapse Box




TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 15 2012, 5:09 am staxx Post #15



I like that Roy, cool trick :)



None.

Jun 16 2012, 4:16 am IAGG Post #16



Hey Roy, I came accross an issue with that method. Will that only work if the buildings are on the top half of the map? Because I cant get the locations to be long enough to Center where they would need to be.



None.

Jun 16 2012, 6:23 am staxx Post #17



Yeah seems buggy from bottom. I can get it to work proper for a few lifts, but on the 5th or 6th lift the buildings start moving upwards when theyre placed. I'm assuming this will only work when the buildings are at the top seeing as the center on top cant move any further north. Maybe Roy has a fix.



None.

Jun 16 2012, 6:44 am Vrael Post #18



If the buildings are in a grid, you could plop some burrowed units down on the left or righthand side (depending on where the buildings are in the map) and use the location shift centered on the burrowed units to replace the buildings. You'd need a location for each horizontal position, the burrowed units "encode" the vertical positions, and the "liftoff detection" location.



None.

Jun 16 2012, 8:31 am Roy Post #19

An artist's depiction of an Extended Unit Death

Oh yeah, come to think of it, you can only push the location upwards from the bottom of the map, which won't help solve your particular problem (because the buildings shifting up is the problem).

Quote from Vrael
If the buildings are in a grid, you could plop some burrowed units down on the left or righthand side (depending on where the buildings are in the map) and use the location shift centered on the burrowed units to replace the buildings. You'd need a location for each horizontal position, the burrowed units "encode" the vertical positions, and the "liftoff detection" location.
Yeah, this seems like the quickest way to fix the existing implementation. I placed them along the bottom of the buildings, though.

It's also important to note that locations think the bottom edge of the map is one tile above where it actually is, so you have to ignore the bottom tile when calculating the size of your location (you'll know the location is the wrong size because the building won't be in the correct spot when you replace it). I added one more action to move the location onto the burrowed Zerg Drone (below the buildings) to force the location to hit the bottom edge of the map. The attached map gives the desired result. You'll still need one location for each row, but you can reuse the burrowed unit as the anchor point for each column (as shown in the attached map).

Attachments:
LiftTheory.scm
Hits: 3 Size: 51.9kb




Jun 18 2012, 11:27 am rockz Post #20

ᴄʜᴇᴇsᴇ ɪᴛ!

Start players with 3 natural upgrades:
you don't need a science facility.

turn off player vision and instead use player 7 or 8 as their vision:
you can hide stuff from the player, like unused upgrade buildings.

You can also pre-place buildings and link them some distance apart. The link goes away if you lift though, so that's why you have to turn off vision or make it impossible to select the building by covering it with CCs.



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

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09: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?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy, Oh_Man, RIVE, Excalibur