Close Door Trap?

AaronPwner

Member
Reaction score
0
I want to create a trap in which the 4 heroes enter a room, the doors close, and they must fight off monsters before they can continue, a simple enough command, but it gets difficult when you have 4 people to deal with..

How can I..

1) Ensure that people who lag behind are not left out of the trap (without force teleporting them in!)
2) Make sure that someone cannot simply walk through it, leaving 2 or 3 people behind.
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Code:
A Quick ASCII Interpretation:
X = closed door
O = open door
| = wall
 ____
|    |
O    X
|____|

They can't get through the closed door. See? Then wait until everyone is there, then:
 ____
|    |
X    X
|____|

Kill stuff and:


 ____
|    |
O    O
|____|
 

Hildagarn

Member
Reaction score
20
hmmm, maybe you could make 4 "stand-on" switch things that all 4 people would have to stand on to open the door to go in.


or do something like this to

Code:
Events
 Unit Enters trap entrance
Conditions
Actions
 Set Trap to Trap +1
 If Trap > or equal to 4 then
Actions
  Close TrapDoor
  Create monsters bla blah blah 
else Do nothing

Trap is an Integer
TrapDoor is the entrance door that shuts
Trap Entrance is a region right inside the trap area
 

AaronPwner

Member
Reaction score
0
Waaghs works, the others does not (that would create problems with the 4 hero scenario, which I just seem to have!)..........

HOWEVER, Waaghs requires me to leave the second door closed, and wait for everyone else, though I suppose that is really the only way to do it, I suppose I could do that.
 

AaronPwner

Member
Reaction score
0
I can't seem to figure this out.

This is supposed to check if A) They are actually in the region, so set the variable to TRUE, or B) They are not playing, or are dead, set it to TRUE (Which allows the door to close!)

Trigger:
  • OpenDoors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Open Dungeon Gate (Vertical) 0026 <gen>


Trigger:
  • RedInactiveCheck
    • Events
      • Unit - A unit enters DoorTrap <gen>
    • Conditions
      • (Player 1 (Red) slot status) Equal to Is unused
    • Actions
      • Set DoorTrapCheck[1] = True
      • bPlayerDead[1] = False


Trigger:
  • RedCheck
    • Events
      • Unit - A unit enters DoorTrap <gen>
    • Conditions
      • (Triggering unit) Equal to Player1
    • Actions
      • Set DoorTrapCheck[1] = True


Trigger:
  • DoorLockAndEvent
    • Events
      • Unit - A unit enters DoorTrap <gen>
    • Conditions
      • DoorTrapCheck[(Integer A)] Equal to True
    • Actions
      • Destructible - Open Dungeon Gate (Vertical) 0026 <gen>
 

Crave.

New Member
Reaction score
0
how bout just putting:

Event: A unit enters Trap
If ((Number of units in (Units in (Playable map area))) Equal to (Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) controller) Equal to User)))
then do blahblahblahyourstuffhereblahblah...
else do nothing

didnt try it yet. not sure if it works ^^
 

Crave.

New Member
Reaction score
0
well mine would work if heros are the only units controlled by the players :p
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
1) That leaks a group
2) Don't double post use the edit button.

If there are four players just make a trigger that counts the number of heroes and, if there is enough heroes lock the door.
 

millz-

New Member
Reaction score
25
Trigger:
  • CountPlayers
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If ((((Player((Integer A))) controller) Equal to User) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set TotalPlayers = (TotalPlayers + 1)) else do (Do nothing)

Trigger:
  • TrapEnter
    • Events
      • Unit - A unit enters Trap <gen>
    • Conditions
    • Actions
      • Set TrappedPlayers = (TrappedPlayers + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TrappedPlayers Greater than or equal to 4) or (TrappedPlayers Equal to TotalPlayers)
        • Then - Actions
          • Destructible - Close TrapDoor
        • Else - Actions

Trigger:
  • TrapLeave
    • Events
      • Unit - A unit leaves Trap <gen>
    • Conditions
    • Actions
      • Set TrappedPlayers = (TrappedPlayers - 1)


First trigger counts the total players in game, second trigger works the closing of doors, third trigger works the leaving of trap. You might want another trigger that works the leaving of players, then decrease the TotalPlayers. The reason for the first trigger is because, the game might be started with less than 4 players. And reason for the third trigger is because:

Code:
Using the scenario given by Waaaaaaagh (didn't count the a's)

     ____
    |    |
 <- O -> X
    |____|

A unit can move in and out of the trap making the total trapped players increase.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top