• 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.

[Trigger] Income

Status
Not open for further replies.
Level 22
Joined
Jun 23, 2007
Messages
3,242
Im making an altered melee map, and the basic source of gold is capturing strategic points (similar to DoW). if anyone could help me trigger this, id appreciate it. here's what i want:
For every Strategic point owned by a certain player, he/she recieves 15 every 5 seconds.

Id also like an "-Income" command to find out how much the income the player is recieving
 
Level 7
Joined
Jan 18, 2007
Messages
180
  • Income
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Control Point) and do (Actions)
        • Loop - Actions
          • Player - Add 15 to (Owner of (Picked unit)) Current gold
  • Command
    • Events
      • Player - Player 1 (Red) types a chat message containing -income as An exact match
      • Player - Player 2 (Blue) types a chat message containing -income as An exact match
      • Player - Player 3 (Teal) types a chat message containing -income as An exact match
      • Player - Player 4 (Purple) types a chat message containing -income as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -income as An exact match
      • Player - Player 6 (Orange) types a chat message containing -income as An exact match
      • Player - Player 7 (Green) types a chat message containing -income as An exact match
      • Player - Player 8 (Pink) types a chat message containing -income as An exact match
      • Player - Player 9 (Gray) types a chat message containing -income as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -income as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -income as An exact match
      • Player - Player 12 (Brown) types a chat message containing -income as An exact match
    • Conditions
    • Actions
      • Set income = ((Number of living Control Point units owned by (Triggering player)) x 15)
      • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (String(income))
      • Set income = 0
This should work.
 
Level 22
Joined
Jun 23, 2007
Messages
3,242
+rep, thnx man
eh, i got the first trigger, but im having trouble with the action part of the second trigger
love your avatar


EDIT: I tested my map, and when i do get income, it says doubl free of group and something else in red letters every time i get income
Also, whenever i type in income, it just pops up and says (string(income))
ive changed the name of the "control point" in the "set income =" trigger, to strategic point. please help.
 
Last edited:
Level 22
Joined
Jun 23, 2007
Messages
3,242
love how you said "it SHALL be integer."
well, i had set the variable to "string", but then i changed it to integer as you said, but it didnt solve anything -.-

EDIT: Ok, i solved the double free of group red message popping up, i just had to disable the custom script
But the income command still doesnt work :(
 
Last edited:
Status
Not open for further replies.
Top