Hey guys! Got a little problem on my "Escape/Maze". If you have played a maze or escape b4 u would know that in some parts of the map u have to collect keys to get through gates. Well, I need help with a trigger that will move the keys to the spot where u took 'em. I have a trigger that works but it takes ages to get it right... Already done it on my last map and I don't wanna do it again.
It looks like this:
But it only works sometimes... When you only have one item in the inventory it works but when you get 2 or more it doesen't work... Please help me!
It looks like this:
Trigger:
- Klot1 Red
- Events
- Unit - A unit owned by Player 1 (Red) Dies
- Conditions
- (Unit-type of (Triggering unit)) Equal to Demon Hunter
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item carried by Demon Hunter 0012 <gen> of type Brinande klot) Equal to Brinande klot 0121 <gen>
- Then - Actions
- Set Klot666 = True
- Trigger - Turn on Klot1 Flytta <gen>
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Klot1 Flytta
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- Actions
- If (Klot666 Equal to True) then do (Item - Move Brinande klot 0121 <gen> to (Center of Klot 1 Copy <gen>)) else do (Do nothing)
- Events
- Klot1 Flytta 2 Red
- Events
- Unit - A unit owned by Player 1 (Red) Dies
- Conditions
- (Unit-type of (Triggering unit)) Equal to Demon Hunter
- Actions
- If ((Item carried by Demon Hunter 0012 <gen> of type Brinande klot) Equal to Brinande klot 0121 <gen>) then do (Item - Move Brinande klot 0121 <gen> to (Position of Demon Hunter 0012 <gen>)) else do (Do nothing)
- Events
- And I have to do that for every single Hero... My other solution is this:
- Orbs
- Events
- Unit - A unit Dies
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0022 <gen>
- (Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0023 <gen>
- (Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0024 <gen>
- (Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0025 <gen>
- Conditions
- Or - Any (Conditions) are true
- Actions
- If ((Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0022 <gen>) then do (Item - Move Burning Orb 0022 <gen> to (Center of Key Copy <gen>)) else do (Do nothing)
- If ((Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0023 <gen>) then do (Item - Move Burning Orb 0023 <gen> to (Center of Key Copy 2 <gen>)) else do (Do nothing)
- If ((Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0024 <gen>) then do (Item - Move Burning Orb 0024 <gen> to (Center of Key Copy 3 <gen>)) else do (Do nothing)
- If ((Item carried by (Dying unit) of type Burning Orb) Equal to Burning Orb 0025 <gen>) then do (Item - Move Burning Orb 0025 <gen> to (Center of Key <gen>)) else do (Do nothing)
- Events
- Events
But it only works sometimes... When you only have one item in the inventory it works but when you get 2 or more it doesen't work... Please help me!