• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Shared bounty trigger

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2023
Messages
37
I put together this shared bounty trigger with the intention to Share the bounty of killed units from player12 between 4 players and should divert 80% of the total income from killing player to player 9, then distribute that at 4 gold to 1 gold for each of the players. I did something wrong, not sure if it's due to solo testing but i'm pretty sure it shouldnt sometimes give me 4 gold, sometimes 1, sometimes 3 ect...
Ive seen similar posts but didnt find anything that would solve my issue, if all else fails i will try using this Shared Bounty: How to do it?

Can someone please take a few minutes to look at the triggers (they are short) and tell me where i went wrong?

  • Player Counter
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player Group - Add (Picked player) to ActivePlayerGroup
              • Set VariableSet ActivePlayerCount = (ActivePlayerCount + 1)
            • Else - Actions
              • Do nothing
  • Shared Income Choice
    • Events
      • Dialog - A dialog button is clicked for BlitzVoteWindow
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Dialog - Clear DialogMenu
      • Dialog - Change the title of DialogMenu to |cff808080I|r|cff79...
      • Dialog - Create a dialog button for DialogMenu labelled |cffd45e19S|r|cffd7...
      • Set VariableSet DialogButtonAr[0] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogMenu labelled |cff800080U|r|cff88...
      • Set VariableSet DialogButtonAr[1] = (Last created dialog Button)
      • Dialog - Show DialogMenu for Player 1 (Red)
      • Dialog - Clear (Clicked dialog)
  • Shared Income Active
    • Events
      • Dialog - A dialog button is clicked for DialogMenu
    • Conditions
      • (Clicked dialog button) Equal to DialogButtonAr[0]
    • Actions
      • Game - Display to (All players) the text: ------>Shared Incom...
      • Player - Set Player 9 (Gray).Current gold to 0
      • Player Group - Pick every player in ActivePlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Divert 80% of the Gold income of (Picked player) to Player 9 (Gray)
  • Shared income Distribution
    • Events
      • Player - Player 9 (Gray)'s Current gold becomes Greater than or equal to 4.00
    • Conditions
    • Actions
      • Set VariableSet GoldDistribution = ((Player 9 (Gray) Current gold) / ActivePlayerCount)
      • Player Group - Pick every player in ActivePlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Add GoldDistribution to (Picked player).Current gold
      • Player - Set Player 9 (Gray).Current gold to 0
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I've heard that checking Player Controller Status during Map Initialization can cause a Desync:
But it's not verified.

The only issue I see is that you're only resetting Player 9's gold if it becomes >= 4.00. Shouldn't it get reset to 0 every time it goes above 0?

Otherwise, when Player 9 has 3 gold, and then let's say goes to 10 gold (+7), the Event will run and the active Players will be given 10 / Player Count. I assume you only want that 7 gold to get divided.
 
Last edited:
Level 4
Joined
Jul 22, 2023
Messages
37
I've heard that checking Player Controller Status during Map Initialization can cause a Desync:
But it's not verified.

The only issue I see is that you're only resetting Player 9's gold if it becomes >= 4.00. Shouldn't it get reset to 0 every time it goes above 0?

Otherwise, when Player 9 has 3 gold, and then let's say goes to 10 gold (+7), the Event will run and the active Players will be given 10 / Player Count. I assume you only want that 7 gold to get divided.
In any case i'll figure something out, maybe set it to initialize on time like 0.1s or something thanks for the warning.

The idea is that when player 9 which is not in the game, gets 4 gold that gold gets split evenly between 4 existing players.
P1,P2,P3,P4 gets a kill that awards 10gold, 2 gold is kept by the killing player and 8 of that gold goes to player 9 - which should then get split to 2 gold each for each of the players including the killing players.
Player 9(P9) has no other function in the game other than to hold gold.
The other version of this i want to set up is on 100% shared.

Have you tried this action?

  • Player - Divert 0% of the Gold income of Player 1 (Red) to Player 2 (Blue)
Although I'm not sure if a/ it works for other gains than regular harvesting and b/ if multiple players can benefit from the same player
Yes, i am using this action.
 
Status
Not open for further replies.
Top