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

Bounty System

Status
Not open for further replies.
Level 2
Joined
Feb 14, 2016
Messages
3
Hi, I'm making a map where it is necessary that you can't control units and share bounty with them. So i make the units change owner to an ally computer but how do i make them share bounty?
(Like in legion TD where the round starts and your units become allies but you get the bounty).

How do i make this system?
 
Level 11
Joined
Oct 9, 2015
Messages
721
Try this:
Create a Player Group variable, then set it to all allies of the computer player
Then pick every player in the TempPlayerGroup and divert 100% of the income of the computer player to his allies

  • Trigger 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempPlayerGroup = (All allies of "player number of computer player")
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Divert 100% of the Gold income of "player number of computer player" to (Picked player)
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
Do this if you want to use more than one computer player:
  • trigger1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempPlayerGroup = (All allies of "computer player 1")
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Divert 100% of the Gold income of "computer player 1" to (Picked player)
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Set TempPlayerGroup = (All allies of "computer player 2")
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Divert 100% of the Gold income of "computer player 2" to (Picked player)
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
That's it, I think this will work for you! Tell me if you find any trouble!
 
Status
Not open for further replies.
Top