Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Terrain Detection - Unit On Land Or Air
[SOLVED] Terrain Detection - Unit On Land Or Air
This topic is locked. You can no longer write replies here.
Sep 25 2012, 5:38 pm
By: wenzer  

Sep 25 2012, 5:38 pm wenzer Post #1



Hi guys! Basically when a team is down to the last man, a location will follow him around. And when the last unit dies, I create a crystal for him. Another team can pick that crystal up and take it to their base, thereby reviving the player. Now, the problem is, when the last unit is an airborn unit, and dies, I can't create the crystal on water. So is there an easy way of doing this?

Now I though of creating locations around the map that are purely on land, and checking whether the last unit is on land. But this could get messy.....Is there an easier way of doing this?

Thanks i advance.



None.

Sep 25 2012, 5:45 pm lil-Inferno Post #2

Just here for the pie

Locations have flags for low ground, medium ground, high ground, low air, medium air, and high air. Just check them off accordingly.




Sep 25 2012, 6:08 pm wenzer Post #3



Thanks...I tired that already....like for ground units, when I enable high ground + medium ground, if the unit doesn't move over water, it works......But what settings would I use for air units.......To check whether an air unit is over land or water?



None.

Sep 25 2012, 6:10 pm samsizzle Post #4



I think low air = over water, medium air = over dirt/jungle/mud/etc, high air = over high dirt and everything on it.



None.

Sep 25 2012, 6:12 pm wenzer Post #5



Thanks again, I will check this out right now and let you know!

Thanks for the prompt reply!



None.

Sep 25 2012, 7:13 pm wenzer Post #6



Actually I'am testing this right now.....but whenever I use 'LOW AIR' it is considering the low lands and water! Hmm...will still try to work on this! By the way, what should I use as the trigger??
If Player 1 brings atleast 1 man to FULL_MAP_LOCATION, MOVE LAST_MAN_LOCATION to MAN at FULL_MAP_LOCATION.

RIGHT???



None.

Sep 25 2012, 7:17 pm lil-Inferno Post #7

Just here for the pie

I haven't mapped in a while so feel free to take this with a grain of salt, but I think if you create the unit on walkable null (the null tiles next to creep in the tileset index) and the move it to the location, it should be able to move anywhere.

If that doesn't work, have a unit outside of the playing area move to the last man's location. If it isn't there, then the unit is over an unwalkable area and you can do stuff accordingly.




Sep 25 2012, 7:56 pm Dem0n Post #8

ᕕ( ᐛ )ᕗ

An easier way that you could bypass this would be to just use an air unit, such as a scourge, as your crystal instead of actually using a crystal. Yes, I know it's a bit lame, but it resolves your issues with ground/water locations.




Sep 25 2012, 10:26 pm Leeroy_Jenkins Post #9



Yeah there is no terrain difference between an air unit flying over dirt and water, so that won't work. Instead, when placing a crystal, you'll want to move one from another location (we'll call it "crystal stock") to the location you want the crystal, in order to avoid unit unplaceable errors. If a unit can not be moved, there will be no error, it will just not be moved. Then, have a trigger immediately after that which detects whether or not the crystal was moved to its new location, if it was not, act accordingly. Also, as a tip, have a separate trigger to always keep your crystal stocked. (For example: if player 8 brings exactly 0 crystal to "crystal stock" then create 1 crystal at crystal stock for p8)



None.

Sep 25 2012, 10:40 pm UnholyUrine Post #10



It may be wise to not have any terrain with dirt + water.

For a clean, arena type look, you can use Space Terrain.

It is possible to make it so that air units cannot move to high grounds.
Attached is a map I made that does exactly that. Using two locations, one that detects high ground, and another to stay on low ground, The Corsairs will be ordered to move back to the lower ground.

Attachments:
Shrapnel Bombers f.scx
Hits: 1 Size: 211.39kb



None.

Sep 25 2012, 11:27 pm samsizzle Post #11



if you're especially good decent at blending, it is possible to just surround your water with high dirt tiles and stuff.



None.

Sep 25 2012, 11:38 pm Leeroy_Jenkins Post #12



Haha true, but you guys are over-thinking this :P

You don't have to detect whether it can be placed or not, you only have to detect whether or not it was placed.



None.

Sep 26 2012, 6:11 am wenzer Post #13



Ok....Well..I had an idea similar to you guys, basically I place crystal and check whether it was placed or not. Now, is there a way I can make the location move when this happens. That is, basically, if at LOC i can't place the crystal, can I then move LOC a bit to the left or something and try placing again. If it fails, again move it a bit more to the left, etc......and so on...Until I find a place suitable for placing the crystal???



None.

Sep 26 2012, 11:17 pm Roy Post #14

An artist's depiction of an Extended Unit Death

Since this isn't for a grid-strict system (where air units would disrupt the layout), mobile grids may be an option: http://www.staredit.net/starcraft/Grid_Systems#Mobile_Grids

Why not just use a neutral air unit instead of a crystal, though? This would certainly be an easier solution.




Sep 28 2012, 7:02 pm wenzer Post #15



Ok. I'am working out the details. Will get back to you guys in a while. I'am trying out the Grid-Strict system as well..Will let you know how things go.

Once again, I thank everyone who helped. In the meantime, does anyone here know how you can force a computer player to Scan Sweep a particular area?

Post has been edited 1 time(s), last time on Sep 28 2012, 7:12 pm by wenzer.



None.

Sep 29 2012, 9:09 am wenzer Post #16



Ok....Basically what I did was, have two locations LOC-AIR and LOC-LAND. One for keeping track of the last unit on the ground and one for the last unit in the air. And a trigger that basically:
Trigger
Players
  • Player 1
  • Conditions
  • BRINGS ATLEAST ONE UNIT TO LOC-AIR
  • Actions
  • CLEAR SWITCH LAST-UNIT-IS-LAND
  • SET SWITCH LAST-UNIT-IS-AIR
  • MOVE LOCATION LAST-AIR-MAN-LOC TO ANY MEN OWNED BY CURRENT PLAYER AT LOCATION LOC-AIR


  • and vise versa. LOC-AIR has "HIGH,MED,LOW FOR AIR" enabled, and LOC-LAND has "HIGH,MED,LOW FOR GROUND" enabled. So I will try to place the crystal first on AIR or GROUND based on the switches set. If I place the crystal first below the last air unit, and it fails, I will drop the crystal on the Last Land unit location. And vice versa. If all fails, I put the crystal in a predefined location!

    Anyways, now I'am trying to figure out how I can make the computer do a Scanner Sweep on a particular location. Is this possible....Anyways, I'am going to create a new thread for this question, so I think you can mark this thread as answered!



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [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?
    [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: jjf28