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.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[2024-5-16. : 3:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: Sylph-Of-Space, Excalibur, 3giannae771gh0, Roy, RIVE