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

income

Status
Not open for further replies.
Level 1
Joined
Feb 12, 2012
Messages
5
i got a problem with my income, attached file for picture of trigger. i get double income each time, and get text like this:
your income is: xxxxxx
your income is: xxxxxx

i'm new, and making kind of an hard map, hoping that people would like it.

another problem i got is that, if someone join(not computer) they get kicked from my game.
 

Attachments

  • income problem.png
    income problem.png
    46.5 KB · Views: 67
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
a question, why income 6 is player 1 and 7 is player 2 etc, why not income [1] = player 1 etc?

also u dont need that much if at 1st

u can do something like this

  • income
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
    • Set income[((Player number of (Owner of (Killing unit))) + 5)] = (income[((Player number of (Owner of (Killing unit))) + 5)] + 1)
  • periodic trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Player - Add income[((Integer A) + 5)] to (Player((Integer A))) Current gold
          • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( your income = + (String(income[((Integer A) + 5)]))))
if player 1-5 is same force then a simple for enough :p

also in ur case not bad if u check if player is playing or no :p

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Player((Integer A))) slot status) Equal to Is playing
    • Then - Actions
      • Player - Add income[((Integer A) + 5)] to (Player((Integer A))) Current gold
      • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( your income = + (String(income[((Integer A) + 5)]))))
    • Else - Actions
if any player can be ally with player 1 (so also player 12 can be ally)

then u can use something like this

  • periodic trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
              • ((Player((Integer A))) is an ally of Player 1 (Red)) Equal to True
            • Then - Actions
              • Player - Add income[((Integer A) + 5)] to (Player((Integer A))) Current gold
              • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( your income = + (String(income[((Integer A) + 5)]))))
            • Else - Actions
about kicks its or dc or desync problem. kinda too lwo info about that, so idk
 
Last edited:
Status
Not open for further replies.
Top