Reincarnation as trigger event?

Flow

New Member
Reaction score
4
How would I go about making a trigger activate when a unit reincarnates? Starts the effect of an ability didn't work, neither did revives or dies (since he doesn't actually die).

I can't have it trigger when his life reaches 0 either, because the Unit - Life even only allows me to choose among units that I've already placed on the map in the editor, but not variables ;<

Any suggestions?

Thanks in advance,
Flow
 

Flow

New Member
Reaction score
4
So it's not possible with regular GUI triggers? Since I'm so clueless when it comes to JASS, I'm hoping to avoid having to use it myself >_<

If I have to, I guess I will :p Thanks very much for your help, Uber :)
 

Fluffball

Well-Known Member
Reaction score
35
Maybe have a trigger, that does all that reincarnation does, in the trigger, then do what-ever else you want to do.
 
Reaction score
456
Paste the Local Handle Variables code to your map header, and paste TriggerRegisterReincarnationEvent code below it to the map header.

You need only 1 trigger for this. Let's say that the name of the trigger is "Detect Reincarnation", and it looks like this:
Code:
Detect Reincarnation
    Events
    Conditions
    Actions
        Unit - Change color of (Triggering unit) to (Color of (Player((Random integer number between 1 and 12))))
So when unit reincarnates, it'll change it's colour to random player colour. Okay, but you still need event for this.

You can add a new event for that trigger whenever you want. I want to add the event when a unit learns some Reincarnation spell (I found 5, but I didn't add the neutral spell there):
Code:
Learn Reincarnation
    Events
        Unit - A unit Learns a skill
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Learned Hero Skill) Equal to Reincarnation
                (Learned Hero Skill) Equal to Reincarnation
                (Learned Hero Skill) Equal to Reincarnation (Cairne)
                (Learned Hero Skill) Equal to Reincarnation (Mannoroth)
    Actions
        Custom script:   call TriggerRegisterReincarnationEvent(gg_trg_Detect_Reincarnation, GetTriggerUnit())
So I guess I have to explain a bit what the custom script does. It adds the reincarnation event to the Detect Reincarnation trigger (gg_trg_Detect_Reincarnation). GetTriggerUnit() is same as triggering unit, so it returns us the unit that learned the skill.
 

Nina

New Member
Reaction score
8
If you still don't want to use the jass solution you can use your unit -life solution by putting in one trigger as action trigger -add to trigger .... the event a unit's life becomes equal to 0
 

Flow

New Member
Reaction score
4
I'm sorry Uberplayer, but I'm gonna take the easy way out and go with Nina's suggestion despite the trouble you went through explaining that to a beginner like myself. I really appreciate you taking time to help though and I know that my entering the world of JASS is inevitable, so I'll probably put what you taught me to good use when that time does come.

Thank you Nina, I never realized that would give me more options for choosing the unit!

+Rep to both of you of course. I love this place :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top