Warcraft III resources & community, 2003–2006 · archived

Detecting Reincarnation

42 posts
#1

Detecting Reincarnation

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?
#2
Event
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
(Ability being cast) Equal to Reincarnation


I think that should work....
#3
Wouldn't it be Finishes casting an ability?
Unless you want to have it at the start oO
#4
hmms... your probably right, lol... none the less it still gets rid of the spell :P
#5
reincarnation isn't cast... :(
#6
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.
#7
first time i'm probably going TO TRY to help somebody here :) But it's only my second post :wink:

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 :wink: But I always loved searching for prgrammingsolutions :wink:
#8
Like I said, "Reincarnation" is no casting ability, you can't refer to it by "Ability being cast"

Don't really know why it's no casting ability, it's the only ability with this property.

Though you created that trigger above you're not such a n00b as others are 8)
#9
Can I get another try? :D

Event
Unit - A unit owned by Player 1 (Red) Dies
Conditions
(Learned Hero skill) Equal to Reincarnation
Actions - Wait X seconds
Remove Reincarnation


Now you don't using the "casting ability"...
Would it work?
#10
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.
#11
I'm gonna try again 8)
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 :D
i'm getting out of solutions :roll:
(Oh my god... is this still a noob solution?)
(Yes it is! But it's also a creative one :wink: )
#12
Now THAT'S a funny thing. Just realized that the event "Unit - Dies" or similar ones don't refer to units that have reincarnation.
#13
couldn't you say that BEFORE i made that solution up...

It would have worked ya know :roll:


Can't you just give them one Ank of Reincarnation :wink:
#14
:lol: good solution :lol:
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
#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?