Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Using Barracks as reusable hatches(doors)
Using Barracks as reusable hatches(doors)
This topic is locked. You can no longer write replies here.
Apr 12 2010, 12:02 am
By: Xero  

Apr 12 2010, 12:02 am Xero Post #1



Ok, I'm making a lil metroid style map and one of the features of my map is hatches. Hatches are represented by barracks of different colors, representing whatever beam can open it. When standing next to a neutral colored barracks, the barracks should lift and allow you to pass. Once there is no unit in range, the barracks will "close".

Now with the introduction over, on to the main point of this thread. Triggering all this. I had my attempts at it, but could never get it right. Also, I want to be able to reuse the locations because there will be many barracks/hatches spread across the map. If anyone has an idea or suggestion or even a verbal beating, I will gladly take it.



None.

Apr 12 2010, 12:04 am Jesusfreak Post #2



Well, I do know that unfortunately, you can't order a comp to lift a building. However, you can remove the grounded one and create a lifted one, if that helps, but the lifting/landing graphic won't be there.



None.

Apr 12 2010, 12:06 am Xero Post #3



Quote from Jesusfreak
Well, I do know that unfortunately, you can't order a comp to lift a building. However, you can remove the grounded one and create a lifted one, if that helps, but the lifting/landing graphic won't be there.
Yeah I already know that. That's what I've been doing, creating lifted, and so on.



None.

Apr 12 2010, 12:37 am CecilSunkure Post #4



There are tons of ways to do this. One way would be to detect when the player gets close to a barracks by using a location constantly centering on the player. Then, center a location onto this barracks, remove/create one lifted. Then, when no barracks are at the location that is centered on th player, remove the floating barracks and create one on the ground using the location you centered.



None.

Apr 12 2010, 12:39 am rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

Just use the doodad door with a color indicator somewhere (like a supply depot, photon cannon, pylon, missile turret, etc...

You'll end up using twice as many units, but it will look better, perform better, and won't be deleted.

I don't think you can give a door, but if you can, you could use that as the location recycler.



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

Apr 12 2010, 1:54 am Xero Post #6



Okay, I tried out Cecil's/Lathanide's suggestion, but everytime I try to create a lifted barracks at "Hatch-Air", I get an error message.



None.

Apr 12 2010, 2:10 am Aristocrat Post #7



Quote from Xero
Okay, I tried out Cecil's/Lathanide's suggestion, but everytime I try to create a lifted barracks at "Hatch-Air", I get an error message.

Lifted units are bigger than their ground counterparts, iirc. I might be wrong.



None.

Apr 12 2010, 2:53 am rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

make the location bigger, unless creating the ground barracks isn't a problem.



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

Apr 12 2010, 3:01 am Oh_Man Post #9

Find Me On Discord (Brood War UMS Community & Staredit Network)

A much more eloquent and aesthetic method (if I do say so myself) is to incorporate a trigger that gives the grounded building to the player. The player then lifts (opens) the building (door) himself (or herself) and a trigger then removes the players control once the building is detected airborne. This prevents the player from flying the building off to God knows where, while still retaining the lifting animation. It even adds a sense of realism and control for the player, as by pressing the Lift button, they are in effect "turning the door knob".

The only dilemma to my magnificantly, brilliant and aesthetically eloquent solution is the door closing behind the player. If you want the door to stay permenatently opened, then no problem, my solution remains as magificantly, brilliant and eloquently aesthetic as ever. However, if you want the door to shut behind the player, you'll need to incorporate a method of shutting the door, which will need to work in one of the following ways.
1. A timer starts counting when the door is opened, after X seconds the door slams shut, regardless of whether you crossed the threshold or not (contigencies will need to be put in place for the player who is midway through the threshold when the timer expires)
2. The player is automatically moved through the threshold via order command (take away control for player) or move (teleportation) and the door is automatically shut behind the player.

There's no way to shut the door aesthetically either, you'll have to remove the airborne version and replace it with a grounded version. You'll also need to logically explain why players can't leave their doors open.

Yeah, and you could also just use the god damned door doodads.
@rockz, I'm not sure if you can give doors either, but you can definitely pre-place them with players 1-12.




Apr 12 2010, 3:07 am Xero Post #10



Quote from Aristocrat
Quote from Xero
Okay, I tried out Cecil's/Lathanide's suggestion, but everytime I try to create a lifted barracks at "Hatch-Air", I get an error message.

Lifted units are bigger than their ground counterparts, iirc. I might be wrong.
Even if I did make the location size bigger, I still get the error message.
Here are triggers that I have. All of them are for player 1.

Conditions:
Neutral brings 1 Hatch to "Missile Range 1"

Actions:
Center location labeled "Hatch-Ground" on Hatch owned by Neutral in "Missile Range 1"
Center location labeled "Hatch-Air" on Hatch owned by Neutral in "Missile Range 1"
Preserver/comment

Conditions:
Neutral brings exactly 1 Hatch to "Hatch-Ground"
Current Player brings exactly 1 Varia Suit to "Hatch-Ground"

Actions:
Create 1 Hatch at "Hatch-Ground" for Player 3. Apply properties. (invince and lifted)
Give all Hatch owned by Player 3 at "Hatch-Air" to Neutral
Remove 1 Hatch for Neutral at "Hatch-Ground"
Preserve/Comment


Conditions:
Current Player brings exactly 0 Varia Suit to "Hatch-Ground"
Neutral brings at least 1 Hatch to "Hatch-Air"

Actions:
Remove 1 Hatch for Neutral at "Hatch-Air"
Create 1 Hatch at "Hatch-Ground" for Player 3. Apply properties. (invince)
Give all Hatch owned by Player 3 at "Hatch-Ground" to Neutral.
Preserve/Comment


And that's it. I know there's something wrong with the second trigger, but I dunno where my fault is at.



None.

Apr 12 2010, 3:12 am Oh_Man Post #11

Find Me On Discord (Brood War UMS Community & Staredit Network)

Try creating the building somewhere else, with a huge location - and then moving it. This solves 99% of all problems with map making, and is also scientifically proven to increase sperm count and ensures you a seat in Heaven.

Also for the location you are creating the Barracks, try unchecking the ground checkboxes. Also make sure that you use create unit with properties and set proprty to lifted.

EDIT: I just used my eagle vision to look over your triggers and found the problem. You've told it to create the thing at location GROUND, if you've got unchecked air boxes, it will give you that error message, change it to create at location AIR.




Apr 12 2010, 3:31 am Xero Post #12



Aaaaahhh, it finally worked! I followed private_parts first suggestion, which is to make a large, separate location to spawn that barracks then move it back. Besides having a really screwed up color that's not neutral, it's reusable and only 4 locations are needed. Now I gotta find a way to fix that weird color. :D 3 hours of trying to solve this behind my back now...sorta. :)



None.

Apr 25 2010, 10:41 pm Lanthanide Post #13



I worked out what the likely problem is here. When you create a terran building with triggers, even if it is Lifted, if it is above non-buildable terran you will get a placement error. The solutions are to either make the ground buildable, or create it elsewhere and move it back, as private_parts suggested.

I'll add this to the quirks wiki page.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Roy, lil-Inferno