• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Need help finding item ability location

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2010
Messages
312
I'm working on a item based resurrection that selects dead heroes in an area and am trying to find the point of the item being used (not the location of the unit using the item). For instance, if I am using Healing Ward I want to find the location of the ward. How would I do this? Below is the current trigger but it doesn't work because there is no location being stated.

  • Potion Revive
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Ressurection
    • Actions
      • Set p_Temp_Point = (Position of (Target item of ability being cast))
      • Special Effect - Create a special effect at p_Temp_Point using war3mapImported\Holy Nova.mdx
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 200.00 of p_Temp_Point) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is dead) Equal to True
                  • (Picked unit) Equal to ua_Dead_Stone[(Integer A)]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[1]
                      • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[3]
                      • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[5]
                      • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[7]
                • Then - Actions
                  • Hero - Instantly revive ua_Dead_Hero[(Integer A)] at (Position of ua_Dead_Stone[(Integer A)]), Hide revival graphics
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[2]
                          • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[4]
                          • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[6]
                          • ua_Dead_Stone[(Integer A)] Equal to ua_Dead_Stone[8]
                    • Then - Actions
                      • Hero - Instantly revive ua_Dead_Hero[(Integer A)] at (Position of ua_Dead_Stone[(Integer A)]), Hide revival graphics
                    • Else - Actions
            • Else - Actions
      • Unit - Remove ua_Dead_Stone[(Integer A)] from the game
      • Custom script: call RemoveLocation(udg_p_Temp_Point)
I'll work out any bugs in the trigger later I just want to know how I would go about finding the point of the ward. Thank you in advance!
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
I think he wants to click an item in inventory, select location and that item will resurrect units nearby the point.

For that, you will need to use this:
  • Triggers
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to AbilityYourItemHas
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • -------- actions here --------
 
Status
Not open for further replies.
Top