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

Trigger!?

Status
Not open for further replies.
Level 6
Joined
May 9, 2011
Messages
228
anyone of you guys can make a trigger that allows the players share the money to all players
for an example
player 1 killed a footman then footman has a bounty of 45 gold then from player 2 to player 10 they can get that exact bounty
every time a player killed an enemy unit they will get the same bounty as what is the bounty value of each enemy unit
 
Level 8
Joined
Sep 23, 2007
Messages
357
Event
A Unit is Killed
Condition
Killing Unit is owned by Player 1
Action
Add 45 to Player 1 gold
Add 45 to Player 2 gold
Add 45 to Player 3 gold
Add 45 to Player 4 gold
Add 45 to Player 5 gold
ect..

or if you want to make it more efficient:
Action
For Integer A 1 to 12
Add 45 to (Player((Integer A))) gold​
^ this is accessed by Conversion - Convert Player Index To Player
 
Level 6
Joined
Dec 21, 2011
Messages
237
[TRIGGER="Unit Bounty"]
Events
Unit - A unit (die)
Conditions
Diying unit equal to (foot man)
Actions
For each (player) integer A
Player - Add 45 gold for (player(integer A))[/TRIGGER]

-------------------------------------------------------------------------------------
 
Last edited:
Level 8
Joined
Sep 23, 2007
Messages
357
[TRIGGER="Unit Bounty"]
Events
Unit - A unit die
Conditions
Diying unit equal to foot man
Actions
Player - Add 45 gold for player 1
Player - Add 45 gold for player 2
Player - Add 45 gold for player 3
Player - Add 45 gold for player 4
Player - Add 45 gold for player 5
Player - Add 45 gold for player 6
Player - Add 45 gold for player 7
Player - Add 45 gold for player 8
Player - Add 45 gold for player 9
Player - Add 45 gold for player 10[/TRIGGER]
-------------------------------------------------------------------------------------

Thats exactly what I just fucking said 2 posts before you
 
Level 6
Joined
May 9, 2011
Messages
228
this is not right what i exactly mean is
i set the bounty on for NH
then each of the players kill each of the NH unit then they will received exact bounty for that NH unit and it will appear on the screen what is the bounty value
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Thats exactly what I just fucking said 2 posts before you

if bounty isnt turned off then killer player get normal bounty+triggered bounty in ur example, until bounty for neutral hostile turned on (what is default).

i dunno if the normal bounty detectable with trigger exclude with Dr Super Good methode.
if u turn off then its ok but still floating text missing also ear to make with for loop and check if player (A) is user, depend what map
 
Level 11
Joined
Nov 15, 2007
Messages
781
Set the unit's bounty to its Point Value in the object editor so you don't have to create a new trigger for every single unit, since you can reference Point Value in a trigger.
 
Status
Not open for further replies.
Top