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

Gold/Exp Share

Status
Not open for further replies.
Level 4
Joined
Oct 30, 2009
Messages
34
Ok I'm using an RoC WE for my map and I was wondering if there is a way to set up a gold/xp share system for kills when fighting.

Just so when the players kill monsters the one person who gets the last hit steals the reward. Thanks.
 
Level 4
Joined
Oct 30, 2009
Messages
34
But...only the player who kills the unit takes the gold,all maps in wc3 have this...And you can easily edit the value of gold each creep or even hero gives in Object Editor.
About EXP it depends,can you explain more?

I want a share system like that shares amongst the close player heroes nearby so when they are fighting a boss or just leveling together the creeps will give everyone close by xp and gold and lumber not just the player that gets the kill.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Then you could trigger it like this..a fast example...

Events:
XX unit dies(your boss)
Condition:
Killing unit is a hero(means the one who killed it was a hero)
Actions:
set a unit group=players attacking your boss
Unit group-pick every unit in your ^above group
-loop actions
Give them gold and exp

----destroy unit group

And you are done!I don't have the time to make you the trigger right now...
 
Level 4
Joined
Oct 30, 2009
Messages
34
So yea here is my lil invention:

  • Testshare
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
      • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Killing unit))) and do (Player - Add (Point-value of (Dying unit)) to (Owner of (Picked unit)) Current gold)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Killing unit))) and do (Player - Add (Supply used by (Dying unit)) to (Owner of (Picked unit)) Current lumber)
Lol :p hope it works.
 
Level 12
Joined
May 30, 2009
Messages
829
So yea here is my lil invention:

  • Testshare
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
      • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Killing unit))) and do (Player - Add (Point-value of (Dying unit)) to (Owner of (Picked unit)) Current gold)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Killing unit))) and do (Player - Add (Supply used by (Dying unit)) to (Owner of (Picked unit)) Current lumber)
Lol :p hope it works.
Unit Group Leak - Must use Unit Group variables and destroy them with the custom script: call DestroyGroup(udg_VARIABLENAME) (I think Custom Scripts require TFT, and if they do, you just gotta go with the leak)
Becuz its not a TFT map. It's ment for RoC?
Unless you want it to be meant* for RoC only, you can slap something in your map that requires TFT.
 
Status
Not open for further replies.
Top