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

EXP share system?

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
157
Hello, i am making a zombie def map with 4 players. I set the experience gain to 1, so 1 kill = 1 exp, but what i want is to all of the 4 players to gain 1 exp for each kill (doesnt matter who gets the kill)
EXP range (not global if possible) example - 1500
 
Level 12
Joined
Feb 5, 2018
Messages
521
  • Events - A unit owned by player dies // could be neutral hostile or whatever player you use for the zombies
  • Actions
  • Set Variable Point = PositionofUnit(TriggeringUnit)
  • Set Variable AoE = 1500.00
  • Set Variable Group = Units within (AoE of Point)
  • Unit Group - pick every unit in Group and do actions
  • -Loop
  • If all conditions are true
  • picked unit not equal to (killing unit)
  • Unit type of picked unit equal to // whatever you need here
  • picked unit is alive equal to true
  • owner of picked unit not equal to (owner of triggering unit)
  • then
  • Hero - Add expirience 1 to picked unit
  • custom script: call RemoveLocation (udg_Point)
  • custom script call DestroyGroup (udg_Group)
  • else
  • Leave this empy // no need to do anything here
Point is point variable
AoE is real variable
Group is UnitGroup variable
 
Status
Not open for further replies.
Top