- Joined
- Oct 18, 2008
- Messages
- 945
I have an item which needs to be invisible to one player, so I made it so that when its dropped it gets hidden and a unit created in its place, which can be 'picked up' by nearby heroes, giving again a item in their inventory and the unit becoming hidden.
the system works fine except for one weird part.
1. item is lost
2. item is removed because it was lost
3. item is acquired even though it doesn't exist anymore
and the engine gets confused in some way.
is there an elegant way to fix this? I don't know all effects of this strange bug so I'd like to prevent it if possible. sadly there doesn't seem to be any specific trigger that would run when items are transferred between units.
the system works fine except for one weird part.
-
Lose
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Teleporter Piece
-
-
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Unit - Create 1 Teleporter Piece for Player 2 (Blue) at (Position of (Hero manipulating item)) facing (Random angle) degrees
-
Item - Create (Item-type of (Item being manipulated)) at (Position of (Hero manipulating item))
-
Item - Hide (Last created item)
-
Hashtable - Save Handle Of(Last created item) as (Key Piece) of (Key (Last created unit)) in Hash
-
Item - Remove (Item being manipulated)
-
Trigger - Turn on (This trigger)
-
-
1. item is lost
2. item is removed because it was lost
3. item is acquired even though it doesn't exist anymore
and the engine gets confused in some way.
is there an elegant way to fix this? I don't know all effects of this strange bug so I'd like to prevent it if possible. sadly there doesn't seem to be any specific trigger that would run when items are transferred between units.