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

Share XP

Status
Not open for further replies.
Level 3
Joined
Oct 9, 2008
Messages
61
  • Share Xp
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Peasant
      • ((Owner of (Killing unit)) controller) Equal to User
      • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Player Group - Pick every player in (All players matching (((Matching player) is an ally of (Owner of (Killing unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
 
Level 12
Joined
May 30, 2009
Messages
829
  • Share Xp
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Peasant
      • ((Owner of (Killing unit)) controller) Equal to User
      • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Player Group - Pick every player in (All players matching (((Matching player) is an ally of (Owner of (Killing unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
Force leak and Unit Group leak.

This is how it should be:
  • Share Xp
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Peasant
      • ((Owner of (Killing unit)) controller) Equal to User
      • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Set Temp_Force = (All players matching (((Matching player) is an enemy of (Owner of (Dying unit))) Equal to True))
      • Player Group - Pick every player in Temp_Force and do (Actions)
        • Loop - Actions
          • Set Temp_Group = (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True))
          • Unit Group - Pick every unit in Temp_Group and do (Actions)
            • Loop - Actions
              • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
          • Custom script: call Destroy_Group (udg_Temp_Group)
      • Custom script: call Destroy_Force (udg_Temp_Force)
 
Status
Not open for further replies.
Top