I'm making a shaman hero and I'm giving him a list of totems to summon, I would like him to have several options of totems to use but only keep one totem active at a time, but I run into the problem that when I made the totem of earth and fire are different skills they do not interact with each other, I need a trigger that when using one of the totems any other existing totem is removed, an example would be when using the wind totem any earth totem that still exists is killed.
So you need to:
1) Keep track of the last created totem.
2) Detect when a totem is created.
3) Remove the tracked totem.
#1 can be achieved with various Variable types, the first that comes to mind is the
Unit variable which keeps track of a single Unit.
#2 can be achieved with various Events, the first that comes to mind is
"A unit Spawns a summoned unit" assuming these totems are summoned. Additionally, you'll need a Condition which checks the Unit-Type of the (Summoned unit). That way you can be certain it wasn't the Archmage's Water Elemental that was summoned but one of your Totems.
#3 can be achieved with the
"Kill unit" or
"Remove unit" Actions, which respectively kills the unit or poofs it from existence (skipping death).
This can be achieved with one single trigger and one single variable. I suggest trying to figure this out on your own and come back with your results:
TopHow To Post Your Triggers I've seen many and many members around the site who need help with their triggers but don't know how to post their triggers in a thread, especially the newcomers. Posting your triggers in a thread is a very important matter when you're asking for a help from other...
www.hiveworkshop.com
Of course you can post any questions you have as you go.