One-Way Elevator?

Chuff

New Member
Reaction score
1
Hi,

I've been working on a map where the player moves up 'levels' of the map via elevators (i.e. the map looks like a giant staircase). For this purpose, once a player has gone 'up' they should not be able to get back 'down', however, other players should be able to keep going 'up'.

Also, monsters from the level above should not be able to go 'down' (elevators only operate when all monsters of current level are dead, so monsters going 'up' is no problem).

I'm sure there must be a simple way to do this, but I'm having trouble finding it.

At the moment, the elevator simply comes back down automatically after 3 seconds. Some sort of "Wait until all user-players units have left the region" would be mighty helpful, but I cant get that happening.

Thanks in advance
 

millz-

New Member
Reaction score
25
Do the elevators do anything special? If not, just use a simple "Teleporter" region. Unit enters Elevator 1, move unit to level 2. Unit enters Elevator 2, move unit to level 3 etc.
 

Chuff

New Member
Reaction score
1
The levels are of course physically connected - the unit walks onto the elevator, goes up, then walks out onto the next level. Wouldn't it look silly if u just zipped up when u walked on it?

I had an idea, perhaps it would be easiest to treat the elevator like a gate, and have a region either side. When they enter one, the elevator opens. When they enter the following one the elevator closes.

Maybe this:

Code:
Trigger A:

    A unit enters <elevator>

    Elevator height is 1

    [elevator goes up and open sides swap]

Trigger B:

    A unit leaves <elevator>

    Number of units in <elevator> = 0
    Elevator height is 2

    [elevator goes down and open sides swap]

That way the elevator should stay up until all units are off it, but what then if those players are attacked by creeps who get into the elevator zone?

Should I just do:

Code:
    And
      Number of units in <elevator> owned by player 1 = 0
      Number of units in <elevator> owned by player 2 = 0
      Number of units in <elevator> owned by player 3 = 0
      ...
      Number of units in <elevator> owned by player 12 = 0

Surely there's a better way?
 

Chuff

New Member
Reaction score
1
Ok, I think I've figured it out. This seems to form a one-way elevator, but I need a way to ensure neutral hostile units can't get on the elevator (at all). Otherwise they could get on it and stop more players getting up, or if they don't count in the trigger they could escape to the level below and cause problems that way. Any ideas?

Here's the code for the one-way elevator so far:

Code:
Elevator Part 1
    Events
        Unit - A unit enters ElevatorRegion <gen>
    Conditions
        (Height of Elevator (1) 0000 <gen>) Equal to 1
    Actions
        Wait 3.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in ElevatorRegion <gen>)) Greater than 0
            Then - Actions
                Destructible - Close West wall of Elevator (1) 0000 <gen>
                Destructible - Set height of Elevator (1) 0000 <gen> to 2
                Destructible - Open East wall of Elevator (1) 0000 <gen>
            Else - Actions
                Do nothing


Elevator Part 2
    Events
        Unit - A unit leaves ElevatorRegion <gen>
    Conditions
        (Height of Elevator (1) 0000 <gen>) Equal to 2
        (Number of units in (Units in ElevatorRegion <gen>)) Equal to 0
    Actions
        Destructible - Close East wall of Elevator (1) 0000 <gen>
        Destructible - Set height of Elevator (1) 0000 <gen> to 1
        Destructible - Open West wall of Elevator (1) 0000 <gen>

Any improvements would be appreciated :)
 

Halofan

New Member
Reaction score
7
I didn't really go by your posts, I just tried my best to make a simple trigger for a one way elevator that didn't react to creeps. The only things you have to make sure of is that the creeps are on Neutral Hostile team (otherwise you'll have to edit the trigger accordingly), and that only one person can use the elevator at a time, otherwise people could get stuck and have to go and mess around with them. They'd still work, but would be buggy and a pain in the ass.

Code:
Elevator
    Events
        Unit - A unit enters <REGION_1>
    Conditions
        (Owner of (Entering unit)) Not equal to Neutral Hostile
    Actions
        Destructible - Set height of <ELEVATOR> to <UP_HEIGHT>

Code:
Elevator Down
    Events
        Unit - A unit enters <REGION_2>
    Conditions
        (Owner of (Entering unit)) Not equal to Neutral Hostile
    Actions
        Destructible - Set height of <ELEVATOR> to <DOWN_HEIGHT>

Place your first region on/under the elevator, so that when the unit enters they trigger it, and then the second region should be there when the player steps off the elevator. Set the height of the elevator for whatever it needs to be. Add wait times as you see fit.
 

Chuff

New Member
Reaction score
1
Yes, that's more or less the idea I'm going off, my code above is pretty similar and allows multiple people to go on the elevator, however I'm still finding it to be flawed (e.g. needs to be number of living units, or a unit dying on the elevator screws things up).

What I've come to realise is that elevators are a terrible, terrible way of doing what I want to achieve :p.

I'm thinking I'll remake it as separate sections, where the players are simply teleported to the next section. The elevators are too tricky and buggy to be worthwhile.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top