I'm making a spell that gives you reincarnation, but then removes the reincarnation once it's been used. The problem is, I have no idea what Event or Condition I'm going to use*
Here's my trigger so far:
Event
Condition
Action - Remove Reincarnation What Event and Condition do I have to use to know if reincarnation is used?
Hm, you're right. There's no way to refer to Reincarnation. I had the idea to do a "unit-dies"-event and then check if the unit has "Reincarnation" (it will be casted then, eh), but that's not possible, too. Correct me somebody if I'm wrong and give a solution, plz.
43 posts BELGIUM! (Do you even know where that is on the map?!) joined
#7
first time i'm probably going TO TRY to help somebody here But it's only my second post
Woudn't it just work if you would does this
Event Unit - A unit owned by Player 1 (Red) Begins casting an ability Conditions (Ability being cast) Equal to Reincarnation Actions - Wait 10 seconds (so the spell can do its thing) - Remove Reincarnation
or would that be to easy? I'm just a noob here But I always loved searching for prgrammingsolutions
Of course you can have another try. Good idea with that trigger, had the same but didn't test it out. It should work though the ability is removed and there's not the problem that the trigger will run although the ability is disabled (after using it).
Edit: Hmm, I think the condition won't work because "Learned Hero Ability" refers to a learning ability event.
43 posts BELGIUM! (Do you even know where that is on the map?!) joined
#11
I'm gonna try again This one is a bit harder... Somewhere on the map, you place an item, one for each player,... (It must be ONE specific item (like an ank or something... doesn't matter, nobody will ever c it)) Then create a region underneath every one of the item separatily....
Then come the triggers:
Events: Unit - A unit owned by Player 1 (Red) Dies Conditions - Item -(Item in (region)) equal to (theitem (<- Can be done by a variable if i'm correct)) Actions - Item - Remove (Random item in (region) (there is only one ) - Wait x seconds (the reincarnation from the hero is working now...) - remove reincarnation...
So next time... if he dies... there's no reincarnation, and there's no item anymore, so he won't run the rest of the trigger anymore (if you make a trigger for each player, and have only one hero, you can disable the trigger after the "remove reincarnation").
Would THAT work i'm getting out of solutions (Oh my god... is this still a noob solution?) (Yes it is! But it's also a creative one )
good solution I didn't know that the dying-event doesn't refer to units having/using reincarnation, just detected this by chance when I tested another possible solution.
A good idea when a trigger isn't working -> create an action that's "Game - Text Message" (there you type any message, e.g. "trigger working) so you see if it's fired or if there's an error in the event
43 posts BELGIUM! (Do you even know where that is on the map?!) joined
#15
So actually... there's no way to detect a Reincarnation in action... Because it doesn't count as a death and neither as a spell being cast... What can we do then?