I'm looking for a system that uses an item [The Key] to open a door. You use it by using the item on the door and it opens it then it closes it after about 5 seconds. Below is my attempt at it.
-
House 1
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Item-type of (Sold Item)) Equal to |cffffcc00Buy House|r
- (Selling unit) Equal to Home Dealership [House] 0003 <gen>
-
Actions
- Item - Remove (Sold Item)
- Hero - Create Key and give it to (Buying unit)
- Set Key[1] = (Last created item)
- Unit - Hide Home Dealership [House] 0003 <gen>
-
Events
-
House 1 Key
-
Events
- Unit - A unit Uses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Key
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item being manipulated) Equal to Key[1]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Target destructible of ability being cast) Equal to Door (Horizontal) 0315 <gen>
-
Then - Actions
- Wait 0.15 seconds
- Destructible - Open Door (Horizontal) 0315 <gen>
- Wait 5.00 seconds
- Destructible - Close Door (Horizontal) 0315 <gen>
-
Else - Actions
- Destructible - Close Door (Horizontal) 0315 <gen>
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Key Bug Fix
-
Events
- Unit - A unit Uses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Key
-
Actions
- Wait 0.10 seconds
- Destructible - Close (Target destructible of ability being cast)
-
Events