• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Why does this trigger not work.

Status
Not open for further replies.
Level 7
Joined
Sep 8, 2011
Messages
211
Why does this trigger not work. [SOLVED]

I made a system a while ago where it would change the owner of a unit and remove an ability from the unit when a unit you controlled (or an ally) either attacked, clicked on within a range or walked within a range of changing unit.

I left the system ages ago and finally got time to edit and I cleaned the triggers but now it wont work. Can anyone help me?

Here is the map and here is the link to the resource.

I don't get it...

  • Range Aggro
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- Leave these triggers --------
      • -------- Set the varibles --------
      • Set A_TempGroup = (Units owned by (Random player from A_Aggro_Player))
      • Set A_Player_Unit = (Random unit from A_TempGroup)
      • Set Position_Unit = (Position of A_Player_Unit)
      • Set A_TempGroup = (Units within A_Effect_Range of Position_Unit matching ((Owner of (Matching unit)) Equal to (Random player from A_Aggroing_Player)))
      • Set A_Range_Aggro = (Random unit from A_TempGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of A_Range_Aggro) is in A_Aggroing_Player) Equal to True
        • Then - Actions
          • -------- If the unit is invisible to the neutral creep it will not change ownership. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (A_Player_Unit is invisible to A_Neutral_Player) Equal to True
            • Then - Actions
            • Else - Actions
              • -------- If the unit isn't invisible. --------
              • Unit - Remove Changing_Ability from A_Range_Aggro
              • -------- You can change the ownership by changing the A_Hostile_Player variable in the settings trigger. --------
              • Unit - Change ownership of A_Range_Aggro to A_Hostile_Player and Change color
              • Unit - Order A_Range_Aggro to Attack A_Player_Unit
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Position_Unit)
      • Custom script: call DestroyGroup(udg_A_TempGroup)
  • Setting A
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Aggro Player = Your friendly players --------
      • Player Group - Add Player 1 (Red) to A_Aggro_Player
      • -------- Aggroing Player = Your neutral creeps that will turn aggressive. --------
      • Player Group - Add Neutral Passive to A_Aggroing_Player
      • -------- Hostile Player = The ownership of the neutral creep will change to this player. --------
      • Set A_Hostile_Player = Player 8 (Pink)
      • -------- Changing Ability = The ability that will be removed or added once the unit changes ownership. --------
      • Set Changing_Ability = Wander (Neutral)
      • -------- Effect Range = This is the range in which the unit will change ownership. --------
      • -------- Only copy this variable if you are using Click or Range system. --------
      • Set A_Effect_Range = 550.00
EDIT: Issue solved. I didn't turn this trigger on correctly at the start of the map.
 
Last edited:
Level 7
Joined
Sep 8, 2011
Messages
211
Sorry, I edited the question and showed the init trigger for it.

EDIT: Turns out I forgot to edit a trigger based on the test map which turned on this trigger..... Well now that it works... Does the trigger look alright? or could it be more efficient.
 
Last edited:
Level 7
Joined
Sep 8, 2011
Messages
211
Do you mean adding the "call DestroyGroup(udg_A_TempGroup)" before the second time I use it?

  • Set A_TempGroup = (Units owned by (Random player from N_Triggering_Player))
  • Set A_Player_Unit = (Random unit from A_TempGroup)
  • Set Position_Unit = (Position of A_Player_Unit)
  • Custom script: call DestroyGroup(udg_A_TempGroup)
  • Set A_TempGroup = (Units within A_Effect_Range of Position_Unit)
 
Status
Not open for further replies.
Top