HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Gate Dies When Closed

01-25-2009, 12:08 AM#1
Valdez
Ok, normally my trigger works fine but in rare occasions when the gates are closed by a player instead of resetting their life it will be destroyed.. Here is what I use..

Opening Gate:
Trigger:
Open MG
Collapse Events
Player - Player 1 (Red) types a chat message containing -open mg as An exact match
Player - Player 2 (Blue) types a chat message containing -open mg as An exact match
Player - Player 3 (Teal) types a chat message containing -open mg as An exact match
Player - Player 4 (Purple) types a chat message containing -open mg as An exact match
Player - Player 5 (Yellow) types a chat message containing -open mg as An exact match
Player - Player 6 (Orange) types a chat message containing -open mg as An exact match
Player - Player 7 (Green) types a chat message containing -open mg as An exact match
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
GateDead[1] Equal to False
Collapse Then - Actions
Set GateLife[1] = (Current life of Gate (Vertical) 0001 <gen>)
Wait 0.50 seconds
Destructible - Open Gate (Vertical) 0001 <gen>
Set GateDead[1] = False
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
GateDead[2] Equal to False
Collapse Then - Actions
Set GateLife[2] = (Current life of Gate (Vertical) 0002 <gen>)
Wait 0.50 seconds
Destructible - Open Gate (Vertical) 0002 <gen>
Set GateDead[2] = False
Else - Actions

Closing Gate:
Trigger:
Close MG
Collapse Events
Player - Player 1 (Red) types a chat message containing -close mg as An exact match
Player - Player 2 (Blue) types a chat message containing -close mg as An exact match
Player - Player 3 (Teal) types a chat message containing -close mg as An exact match
Player - Player 4 (Purple) types a chat message containing -close mg as An exact match
Player - Player 5 (Yellow) types a chat message containing -close mg as An exact match
Player - Player 6 (Orange) types a chat message containing -close mg as An exact match
Player - Player 7 (Green) types a chat message containing -close mg as An exact match
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
GateDead[1] Equal to False
Collapse Then - Actions
Destructible - Close Gate (Vertical) 0001 <gen>
Wait 0.50 seconds
Destructible - Set life of Gate (Vertical) 0001 <gen> to GateLife[1]
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
GateDead[2] Equal to False
Collapse Then - Actions
Destructible - Close Gate (Vertical) 0002 <gen>
Wait 0.50 seconds
Destructible - Set life of Gate (Vertical) 0002 <gen> to GateLife[2]
Else - Actions

Now I have a theory, but not shure if I'm, right.. Becuase the event can be 1 of 7 different options I think it saves the life of the gate for that player so when another player (not the one who opens it) closes the gate it has the saved life equal to 0 and so it dies..


So any ideas? And if my theory is right any ideas on how to fix it?
01-25-2009, 12:34 PM#2
Matarael
Perhaps you should close it slowly.
01-25-2009, 12:50 PM#3
Anitarf
Your theory is incorrect, the triggers will run for all players when one player types a chat message, otherwise the game would desync (you'd get a server split). Consider instead what happens when someone types open when the gate is already open.
01-25-2009, 06:48 PM#4
Valdez
Quote:
Originally Posted by Anitarf
Your theory is incorrect, the triggers will run for all players when one player types a chat message, otherwise the game would desync (you'd get a server split). Consider instead what happens when someone types open when the gate is already open.

Thanks Anitarf, I will add in an already open check before it resets its health.