Warcraft III resources & community, 2003–2006 · archived

Random Text

5 posts
#1

Random Text

Anyone know how to make random text appear? Like if you type something, theres a 1/3 chance one text will appear, a 1/3 chance another text will appear, and a 1/3 chance another text will appear? :?
#2
Randomize (trigger)

Event
Player (color) types a chat message containing (txt) as an exact match.

Action
Set Variable1 = Random iniger between 1 and 3
Run var1
Run var2
Run var3

Var1 (trigger)

Conditions
Variable1 = 1

Action
Game - Text message (text)

Var2 (trigger)

Conditions
Variable1 = 2

Action
Game - Text message (text)

Var3 (trigger)

Conditions
Variable1 = 3

Action
Game - Text message (text)
#3
Err, I'm a little confused...
#4
Let me rewrite it then... but I guess it'd be better if it's one trigger, no?

Events
- Player types {chat message here} (This one is if they type)
- Periodic Event (This one is if you want it to appear at random times, remember, pick only one.)

Actions

- Set variable(this one has to be an integer) to {random integer between 1 and 3}
- If Variable = 1 (This is the if/then/else action)
Then Game - Text Message {message here}
Else If Variable = 2
Then Game - Text Message (message 2 here)

Etc etc... change the 3 to the max amount of help messages if you wish.
#5
TelefraggedLet me rewrite it then... but I guess it'd be better if it's one trigger, no?

Events
- Player types {chat message here} (This one is if they type)
- Periodic Event (This one is if you want it to appear at random times, remember, pick only one.) <---Totally not true, you can have as many as you want, Raptor--

Actions

- Set variable(this one has to be an integer) to {random integer between 1 and 3}
- If Variable = 1 (This is the if/then/else action)
Then Game - Text Message {message here}
Else If Variable = 2
Then Game - Text Message (message 2 here)

Etc etc... change the 3 to the max amount of help messages if you wish.


let me rewrite that, i guess it would be better if it was 1 action (minus setup)


Setup:
  Event: Map init
  Condition:
  Actions:
    var_RandomString[0] = "Holy cow"
    var_RandomString[1] = "Push that rainbow"
    var_RandomString[2] = "Puppies and unicorns"

Trigger:
  Event: Whatever you want
  Condition:
  Actions:
    Game - Text Display Message (var_RandomString[(random integer between 0 and 2)] to all players