- Joined
- Dec 19, 2007
- Messages
- 1,234
Which trigger is used to detect when a hero is dropping an item or in essense give his item to another hero?
Unit loses an item
Unit acquires an item
^ APPROVED, but:Works fine for me when I
- lose
- Events
- Unit - A unit Loses an item
- Conditions
- Actions
- Game - Display to (All players) the text: item lost
- drop an item on the ground
- drop an item on another hero
You could try (previous owner of item)
*** Attached: 2nd fail on item swap, but allow to see the problam more clearWow that is smart! the point is I try to make an ability that set accordingly to the hero attributes with bonuses but I just realized that when an hero drops an item he still count as hero with the item (in matter of attributes) I try add 0.01 second delay and I will post if it worked out.
Edit: it was indeed the solution but there is one more thing: when hero gives an item to another hero, the given hero is updated but the giving hero is not updated, I try to make it myself but if you know it would help
*** attached: the fail attemp on item swap
I'm struggling to read through your triggers, so I think I'll make a test map quick.
If you only have 1 hero per player, you could use this method:
And the just refer to Hero[player number of player]
- Set Owner
- Events
- Unit - A unit Acquires an item
- Conditions
- Actions
- Game - Display to (All players) the text: (Name of (Owner of (Item being manipulated)))
- Item - Change ownership of (Item being manipulated) to (Owner of (Triggering unit)) and Change color
- Game - Display to (All players) the text: (Name of (Owner of (Item being manipulated)))
It really sad to give up like this! but in worst case I will set unit group = each and any hero on the battlefield , without illusions. Then: I will check each and any hero and set this for each one of them, making lag if not any other way is approved.Its a single player map with 4 heroes controlled at all times (or more)
Edit: and netural has 100 heroes (or more)
Freaking hell I think I GOT IT but I need to test first: maybe giving the item actually send both units: the giving unit and the given unit but due to some bug it refer the giving unit 2 times? I will need to check and I will post complete solution
Use a timer with 0.00 expiration time instead of wait/dummy unit.