It works well, but I'm starting to recieve this annoying messages ~"You trying to use item which isn't in your inventory". Because it finds both TPs from main hero and tempest, and try to use both too. When I need only one tempest's TP =)
Thanks! But now the question is: how to exclude all tpscrolls from main hero Inventory(Arc Warden) and keep only from Tempest.
Now I'm using:
var tpscroll = ObjectManager.GetEntities().FirstOrDefault(x => x.IsValid && x.Id == AbilityId.item_tpscroll);
var tempestt = ObjectManager.GetEntities().FirstOrDefault(x => x != ObjectManager.LocalHero && x.HasModifier("modifier_arc_warden_tempest_double"));
Player.UseAbility(tempestt, tpscroll, Radiant_Triangle);
It works well, but I'm starting to recieve this annoying messages ~"You trying to use item which isn't in your inventory". Because it finds both TPs from main hero and tempest, and try to use both too. When I need only one tempest's TP =)
Comments
ObjectManager.GetEntities<Item>().FirstOrDefault(x => x.IsValid && x.Id == AbilityId.item_tpscroll)
Thanks! But now the question is: how to exclude all tpscrolls from main hero Inventory(Arc Warden) and keep only from Tempest.
Now I'm using:
var tpscroll = ObjectManager.GetEntities().FirstOrDefault(x => x.IsValid && x.Id == AbilityId.item_tpscroll);
var tempestt = ObjectManager.GetEntities().FirstOrDefault(x => x != ObjectManager.LocalHero && x.HasModifier("modifier_arc_warden_tempest_double"));
Player.UseAbility(tempestt, tpscroll, Radiant_Triangle);
It works well, but I'm starting to recieve this annoying messages ~"You trying to use item which isn't in your inventory". Because it finds both TPs from main hero and tempest, and try to use both too. When I need only one tempest's TP =)
Thanks! But now the question is: how to exclude all tpscrolls from main hero Inventory(Arc Warden) and keep only from Tempest.
Now I'm using:
It works well, but I'm starting to recieve this annoying messages ~"You trying to use item which isn't in your inventory". Because it finds both TPs from main hero and tempest, and try to use both too. When I need only one tempest's TP =)
@Nagibator666
BRILLIANT! Works like a swiss clock! Thank you