Hey guys, this is the most frustrating problem i've had yet.
Sometimes the function works and hides the units, other times the key just stays in your inventory and it doesn't hide the doors.

List of things i tried:
Extending the triggering region.
Putting the key in every slot, and testing it.
Can you help me make it a 100% chance to open these pesky doors of mine?
Sometimes the function works and hides the units, other times the key just stays in your inventory and it doesn't hide the doors.

-
Door 1
-
Events
-
Unit - A unit enters Region 159 <gen>
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 1)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 2)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 3)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 4)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 5)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Purple Key
-
-
Then - Actions
-
Item - Remove (Item carried by (Triggering unit) in slot 6)
-
Unit - Hide Door 0160 <gen>
-
Unit - Hide Door 0164 <gen>
-
-
Else - Actions
-
-
Trigger - Turn off (This trigger)
-
-



List of things i tried:
Extending the triggering region.
Putting the key in every slot, and testing it.
Can you help me make it a 100% chance to open these pesky doors of mine?
