Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Openin/Closing Doors
Openin/Closing Doors
May 12 2008, 5:04 pm
By: Cardanis  

May 12 2008, 5:04 pm Cardanis Post #1



So, I've got five different triggers corresponding to opening and closing these doors. First of all, I want it so if nobody controls the beacon (its neutral) for anybody to be able to open the door. But if a player owns it, only they can. The two problems I have, are 1) I have three doors stacked together in the location, but only one of them opens/ closes. 2) I walk a unit into the location, and it lowers. However, when he leaves, it kindof raises, goes back down, jumps back up, jumps back down, then raises. . . .which is really kindof crazy. Anybody know what to do? (Im using hypertrigs just so you know)

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Any unit", "player1northdoor", At least, 1);
Bring("Player 12", "Mature Crysalis", "player1northdoor", At least, 1);
Bring("Player 12", "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Any unit", "player1northdoor", At least, 1);
Bring("Player 12", "Mature Crysalis", "player1northdoor", At least, 1);
Bring("Player 1", "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Any unit", "player1northdoor", Exactly, 0);
Bring("Player 12", "Mature Crysalis", "player1northdoor", At least, 1);
Bring("Player 12", "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Any unit", "player1northdoor", Exactly, 0);
Bring("Player 12", "Mature Crysalis", "player1northdoor", At least, 1);
Bring("Player 1", "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", enabled);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
Bring("Player 12", "Mature Crysalis", "player1northdoor", Exactly, 0);

Actions:
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("All players", "Right Upper Level Door", "player1northdoor", disabled);
}



None.

May 12 2008, 5:07 pm Heimdal Post #2



Whenever you execute "set doodad state" it only affects the doodad (unit, actually) in the top left of the location. Executing the action multiple times does nothing.

I haven't examined the triggers closely enough, but I think changing the owner of the door, then running some triggers based off that would solve your problem of "which door do I need to change?"



None.

May 12 2008, 5:18 pm fritfrat Post #3



Mainly, do what Heimdal said, which is to have each door owned by a different player and each of the 3 actions affect a door by a different player. Second, add a detection as to let the triggers only fire once; for example, if switch is clear, open doors and set switch, and if switch is set, close doors and clear switch.



None.

May 12 2008, 6:34 pm Wormer Post #4



Takeing into account what Heimdal and frifrat have said these triggers will do what you want.

Code
//-----------------------------------------------------------------//

Trigger(COMPUTER){
Conditions:
Switch("Door1", Not Set);
Bring(PLAYERS_FORCE, "Any unit", "player1northdoor", At least, 1);
Bring("Player 12", "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Preserve Trigger();
Set Switch("Door1", Set);
Set Doodad State("Player 9", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("Player 10", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("Player 11", "Right Upper Level Door", "player1northdoor", disabled);
}

//-----------------------------------------------------------------//

Trigger(PLAYERS_FORCE){
Conditions:
Switch("Door1", Not Set);
Bring(Current Player, "Any unit", "player1northdoor", At least, 1);
Bring(Current Player, "Protoss Beacon", "p1beacon", At least, 1);

Actions:
Preserve Trigger();
Set Switch("Door1", Set);
Set Doodad State("Player 9", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("Player 10", "Right Upper Level Door", "player1northdoor", disabled);
Set Doodad State("Player 11", "Right Upper Level Door", "player1northdoor", disabled);
}

//-----------------------------------------------------------------//

Trigger(COMPUTER){
Conditions:
Switch("Door1", Set);
Bring(PLAYERS_FORCE, "Any unit", "player1northdoor", Exactly, 0);

Actions:
Preserve Trigger();
Set Switch("Door1", Clear);
Set Doodad State("Player 9", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("Player 10", "Right Upper Level Door", "player1northdoor", enabled);
Set Doodad State("Player 11", "Right Upper Level Door", "player1northdoor", enabled);
}

//-----------------------------------------------------------------//




Some.

May 12 2008, 9:56 pm Cardanis Post #5



Okay, I fixed that issue, but now I have another one. I have gate hinges, and strong gate hinges. The strong gate hinges work perfectly fine (they're matured chrysalis') but the normal ones don't (they're shield batteries) they're permanently stuck open. Im wondering, does [any unit] encompass a shield battery but not a mature chrysalis for some reason? any theories?



None.

May 12 2008, 10:04 pm Falkoner Post #6



Both should be seen by Any Unit, are you using a different kind of door for those ones?



None.

May 12 2008, 10:07 pm Cardanis Post #7



The strong door uses upper level doors and the not strong door uses pit doors. And if both are recognized as any unit, why do the strong doors work? Like I said the trigs are the same except a change in switch names and locations. And what does [men] encompass? is it any moving unit on ground? Or will it not detect tanks etc.



None.

May 12 2008, 10:21 pm Heimdal Post #8



Quote from Cardanis
The strong door uses upper level doors and the not strong door uses pit doors. And if both are recognized as any unit, why do the strong doors work? Like I said the trigs are the same except a change in switch names and locations. And what does [men] encompass? is it any moving unit on ground? Or will it not detect tanks etc.
Your triggers are only affecting "right upper level door." That is to say, the conditions are fine, it's your actions that are wrong.



None.

May 12 2008, 10:22 pm Cardanis Post #9



Thats not it, I changed it to suit which doors it is.



None.

May 13 2008, 12:02 am fritfrat Post #10



What exactly are you trying to do with these "hinges," again? If they are there just for looks then they wouldn't make a difference on a trigger if the trigger specifies the door type. Try removing the hinges and see if the doors still have issues: the first step in fixing bugs is to isolate the problem, which is best done by taking things out of the equation.

[men] is everyone under the "ground units," "air units," "critters," and "heroes" categories of the unit tree. There might be a couple more, but I don't know them off the top of my head.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Roy