HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

text show status for player

10-05-2003, 01:34 PM#1
Crimsongg137
ok im not sure how to make it when the time runs out and after it runs out i want it to show ur income status like your current income is 41.
10-05-2003, 01:38 PM#2
Coffein
Use Game - Text Message to Player
and then choose Concatenate Strings. Then select convert write something in the first string like "Your current income is: " and in the second you choose Convert Integer to String.
10-05-2003, 01:51 PM#3
Crimsongg137
ill c wut i can do
10-05-2003, 02:29 PM#4
Crimsongg137
can any 1 tell me wut i hvae to rite after the ur incoem is:....
10-05-2003, 02:39 PM#5
Dark_Templar
As meant before, use concatenate strings. For example: Your current income is + String(IntegerIncome_Variable)
10-05-2003, 02:41 PM#6
Crimsongg137
oo but how would i use it if i had this income thing like this
Events
Time - Every 20.00 seconds of game time
Actions
Set gold = 100
Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type oil wells) and do (Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + gold))
10-05-2003, 02:51 PM#7
Coffein
Then use
Your current income is + String(gold)
10-05-2003, 03:14 PM#8
Crimsongg137
r u sure
10-05-2003, 03:15 PM#9
Crimsongg137
because it didnt work
10-05-2003, 03:21 PM#10
Coffein
It DOES work.
You have to Convert an Integer to a String. And the integer is your gold variable..
10-05-2003, 08:17 PM#11
Crimsongg137
ok i found out but now it wont add it will be like at 100 or something like that
10-06-2003, 01:34 AM#12
Saethori
I think I'm getting what he's saying.

Here's what I understand it to be, and how to add it.

Every 20 seconds, the game gives a player 100 gold for each 'Oil Well' he controls. Then it displays exactly how much gold he just got (not how much he currently has)

The best way, I see, is to alter the variable function into an array equal to the number of players.


After every 20 seconds..
Set Variable gold = 100
Set Variable count(1) = 0
Set Variable count(2) = 0

Pick every unit of type 'Oil Well' and
Set Variable gold(player number of owner of picked unit) = count(player number of owner of picked unit) + gold

Pick every player and
Set Picked Player's current gold to Picked Player's current gold + count(player number of picked player)
Show Text Message to (picked player) "Your gold income is " + String(count)


If you add more players, just increase the size of the array, and add more 'Set Variable' to the beginning..

If the player number is pretty large, like 8, then use a loop fuction that sets all of them to 0.