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.
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
[03:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
[03:02 am]
Ultraviolet -- fuck those motherfuckers
[11:02 pm]
NudeRaider -- PSA: ASUS apparently decided their RMA department needs to "become profitable" and for a while now outright tries to scam customers. They were called out on it a year ago, promised to change, but didn't. https://www.youtube.com/watch?v=7pMrssIrKcY so my recommendation: Stop buying ASUS, and if you already have and need something RMA'd, make sure to not let them bully you into paying.
[2024-5-15. : 3:08 pm]
Oh_Man -- example of wat u mean?
Please log in to shout.


Members Online: lil-Inferno, 3lydiae663ha0, 4audreyc9991wc7, Roy, 9harpere4422yB3, 7giannae3485fh7