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

To stop specific units from giving exp

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2019
Messages
60
Hello, i have this experience system in my map and it works great, except that summoned units and wards from bosses also gives experience when they die, wich i would really appriciate if they didn't

But i dont know how to fix it :S


First i tought it would be enough to give them the Unit classification = Ward, but that didnt work
Then i tried to turn them into Buildings, that didnt work, still gave exp
Then i tried to add some Unit Type conditions in the exp trigger but with no luck

How do i fix this?

  • Get Exp
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Set ExpPoint = (Position of (Killing unit))
      • Set ExpGroup = (Units within (Real(ExpRange)) of ExpPoint matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of (Killing unit))) Equal to True))))
      • Unit Group - Pick every unit in ExpGroup and do (Actions)
        • Loop - Actions
          • Set ExpInteger = (ExpPerLevel x (Level of (Dying unit)))
          • Floating Text - Create floating text that reads (|c00580088+ + ((String(ExpInteger)) + XP|r)) above (Picked unit) with Z offset 0.00, using font size 7.00, color (45.00%, 25.00%, 30.00%), and 0.00% transparency
          • Floating Text - Hide (Last created floating text) for (All players)
          • Floating Text - Show (Last created floating text) for (Player group((Owner of (Picked unit))))
          • Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
          • Hero - Add ExpInteger experience to (Picked unit), Show level-up graphics
      • Custom script: call RemoveLocation(udg_ExpPoint)
      • Custom script: call DestroyGroup(udg_ExpGroup)
 
Level 9
Joined
Jul 30, 2018
Messages
445
All you need to do is to make an if-statement: If ((Dying Unit) is a Ward not equal to true). Of course they are going to give experience, because all you check is the level of the unit. Another way to is to simply set the level to 0 for all the units that you don't want to give experience points.
 
Status
Not open for further replies.
Top