Staredit Network > Forums > SC2 Assistance > Topic: Random Intergers and Displaying the outcome?
Random Intergers and Displaying the outcome?
Apr 30 2010, 10:57 pm
By: ZeroAme  

Apr 30 2010, 10:57 pm ZeroAme Post #1



So I have in my TD a tower that will randomly get 0-5 minerals from a creep, and then it will say +# over that creep to let the player know how much they got from it. Im using this set-up.

Quote
Theif Turret - Money
Events
Unit - Any Unit is attacked
Local Variables
tmpTag = No Text Tag <Text Tag>
Conditions
(Unit type of (Attacking Unit)) == Theif
Actions
General - Wait 0.5 Game Time seconds
Player - Modify player 1 Minerals: Add (Random integer between 0 and 5)
Text Tag - Create a text tag with the text "+1" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0 (initially Visible) can also set whether false is enforced
Variable - Set tmpTag = (Last created text tag)
Text Tag - Set Text color(s) for tmpTag to (0%, 50%, 75%)
Text Tag - Set the velocity of tmpTag to 1.0 coordinates per second at an angle of 90.0 degrees from horizontal
Text Tag - Set Fade Duration time for (Last created text tag) to 2.0 seconds
General - Wait 2.1 Game Time seconds
Text Tag - Destroy tmpTag

How do I change:
Text Tag - Create a text tag with the text "+1" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0 (initially Visible) can also set whether false is enforced
so the +# is the outcome of the integer?



None.

Apr 30 2010, 11:13 pm Swampfox Post #2



Like this:
Text Tag - Create a text tag with the text ("+" + (Text(YOURVARIABLE))) for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0 (initially Visible) can also set whether false is enforced

("+" + (Text(YOURVARIABLE))) = a function 'Combine Text' with the second text entry being another function 'Convert Integer To Text'





None.

May 1 2010, 1:07 am ZeroAme Post #3



Alright thanks :D



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:43 am]
TheHappy115 -- Yea, thats the issue. Thanks. It would also explain why my deleted map couldn't get updated. Updated version reduced collision on units (only thing added) since was dodging game (players collide with each other)
[05:26 am]
Ultraviolet -- If so, I'd just focus on getting them on scmscx.com and then you can link to that in the showcase thread for your maps
[05:25 am]
Ultraviolet -- I can't upload my EUD maps, I think the DLDB has some issue with handling them. Are you trying to upload EUD maps?
[02:06 am]
TheHappy115 -- Its been awhile but ever since I requested one of the Maps I posted to be deleted since I couldn't delete it myself (or update it), I haven't been able to upload any more maps. Any reason for that?
[2024-5-26. : 7:14 pm]
Kyradax -- Hi
[2024-5-26. : 5:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
[2024-5-22. : 6:10 am]
Riney -- Somethings never change.
Please log in to shout.


Members Online: eksxo, jun3hong