• 🏆 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!

Small Trigger Issuse

Status
Not open for further replies.
Level 7
Joined
Sep 8, 2011
Messages
211
Hey guys, I have been working on a small map for fun and this trigger just wont work. It might just be me being tired but I have no clue what is wrong with this trigger.

What it should be doing is when a Hero unit finishes casting the Resurrection ability on a circle of power assigned to a hero (they are called Dead_Circle [player number]) it should revive the dead hero at the point of the circle of power. I haven't added in the moving of the circle of power yet because this part isn't working yet.

Thanks. :vw_sad:

Edit: Sorry I just realized this was placed in the wrong section. I should probably go to bed...

  • Revive Players
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection (|cffffff00C|r)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to Dead_Circle[1]
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of Dead_Circle[1])) + ( has been revived. 200 Bonus exp awarded to + (Name of (Owner of (Casting unit)))))
          • Set Revival_Point[1] = (Position of Dead_Circle[1])
          • Hero - Instantly revive Heroes[1] at Revival_Point[1], Hide revival graphics
          • Custom script: call RemoveLocation (udg_Revival_Point[1])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to Dead_Circle[2]
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of Dead_Circle[2])) + ( has been revived. 200 Bonus exp awarded to + (Name of (Owner of (Casting unit)))))
          • Set Revival_Point[2] = (Position of Dead_Circle[2])
          • Hero - Instantly revive Heroes[2] at Revival_Point[2], Hide revival graphics
          • Custom script: call RemoveLocation (udg_Revival_Point[2])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to Dead_Circle[3]
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of Dead_Circle[3])) + ( has been revived. 200 Bonus exp awarded to + (Name of (Owner of (Casting unit)))))
          • Set Revival_Point[3] = (Position of Dead_Circle[3])
          • Hero - Instantly revive Heroes[3] at Revival_Point[3], Hide revival graphics
          • Custom script: call RemoveLocation (udg_Revival_Point[3])
        • Else - Actions
 
Last edited:
Delete the [2] and [3] if/then/else and replace the first with
  • Set Owner = (Owner of (Triggering unit))
  • Set Target = (Target unit of ability being cast)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Target Equal to Dead_Circle[(Player number of Owner)]
    • Then - Actions
      • Game - Display to (All players) for 10.00 seconds the text: ((Name of Owner) + ( has been revived. 200 Bonus exp awarded to + (Name of Owner)))
      • Set Revival_Point = (Position of Target)
      • Hero - Instantly revive Heroes[(Player number of Owner)] at Revival_Point, Hide revival graphics
      • Custom script: call RemoveLocation (udg_Revival_Point)
I am not sure I can really see an issue in your trigger, other than optimizing it.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
You can't use (Target unit of ability being cast) with finish casting ability event.
 
Status
Not open for further replies.
Top