• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Phoenix Morph in triggers

Status
Not open for further replies.
Level 5
Joined
Jul 27, 2013
Messages
115
I haven't find a thread like this, so here goes:

I want my trigger to detect when a unit with phoenix morph dies AND morphs back into base unit, and then do something to that unit (but not before he is killed and then reborn).

How should I do it through GUI?

Also, as rules say that's allowed, all the helpful answers will get +rep. :ogre_haosis:
 
Level 5
Joined
Jul 27, 2013
Messages
115
Strangely, this worked:
  • Reincarnation
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Gryphon Rider
      • (Ability being cast) Equal to Reincarnation (New)
    • Actions
      • Unit - Remove Reincarnation (Info) from (Casting unit)
      • Unit - Add Reincarnation Dummy Ability to (Casting unit)
      • Unit - Order (Casting unit) to Orc Blademaster - Wind Walk
Reincarnation(New) is actually based off of Phoenix Morph, and Reincarnation Dummy Ability is based off Wind Walk. The whole idea is to display cooldown on Reincarnation icon, which is done through a separate ability, Reincarnation(Info).

Thanks for the help!

EDIT: Actually, the problem's not quite solved. Here's the triggers:

  • Reincarnation
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Gryphon Rider
      • (Ability being cast) Equal to Reincarnation (New)
    • Actions
      • Set WriteIndex = (WriteIndex + 1)
      • Set caster2[WriteIndex] = (Casting unit)
      • Wait 2.00 game-time seconds
      • Set ReadIndex = (ReadIndex + 1)
      • Unit - Remove Reincarnation (Info) from caster2[ReadIndex]
      • Unit - Add Reincarnation Dummy Ability to caster2[ReadIndex]
      • Unit - Order caster2[ReadIndex] to Orc Blademaster - Wind Walk
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReadIndex Equal to WriteIndex
        • Then - Actions
          • Set ReadIndex = 0
          • Set WriteIndex = 0
        • Else - Actions
      • Set MaxIndex = (MaxIndex + 1)
      • Set caster[MaxIndex] = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • 1 Equal to MaxIndex
        • Then - Actions
          • Trigger - Turn on Reincarnation Loop <gen>
        • Else - Actions
  • Reincarnation Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CurrentIndex) from 1 to MaxIndex, do (Actions)
        • Loop - Actions
          • Unit - Remove Reincarnation Dummy Ability from caster[CurrentIndex]
          • Unit - Add Reincarnation (Info) to caster[CurrentIndex]
          • Set caster[CurrentIndex] = caster[MaxIndex]
          • Set MaxIndex = (MaxIndex - 1)
          • Set CurrentIndex = (CurrentIndex - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MaxIndex Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
Despite all the strangeness of these triggers, the only problem is that after a while from the Gryphon Rider's respawn, he's teleported to the nearest ground-passable location. Any ideas on a fix?

EDIT2: Fixed, had to remake Dummy Ability to be based off of Fan of Knives.
 
Last edited:
Status
Not open for further replies.
Top