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

Random Tips in game

Status
Not open for further replies.
Level 4
Joined
Aug 7, 2008
Messages
115
I want to know a trigger that makes my tips appears inside the game ramdomly

example: every 5 minutes show 1 tip of 10 ramdomly
5 minutes of the game: "Tip2 appears: You can type commands to see the commans of the game...."
10 minutes of the game: "Tip8 appears: You can buy the epic items there..."15 minutes ....
thanks,
 

x3m

x3m

Level 3
Joined
Apr 11, 2008
Messages
51
Just use math - random numbers between x and y. Store in variable.
If yourvariable = 1 then echo message1.
 
exampleie9.jpg
 

x3m

x3m

Level 3
Joined
Apr 11, 2008
Messages
51
Or do an array, so the same message can't be displayed before the rest have.
 
Level 3
Joined
Apr 28, 2007
Messages
71
Eeek scorpion...screenshot. Trigger tags?
Variables:
Tips(String Array) size of array = number of tips you want
TipGen(Integer)
  • Events
  • Time - Every 18.00 second of game time
  • Conditions
  • Actions
  • Set Tips[1] = Press F9 for help
  • Set Tips[2] = Type: -commands for commands
  • Set Tips[3] = Another Pointless Tip
  • Set TipGen = Random Number(1-3)
  • If TipGen = 1 Then Game - Display Text to Players(All) Tips[1] Else Do Nothing
  • etc...
I didn't have WE but ill update when i do...
 
Level 9
Joined
Jun 26, 2007
Messages
659
it would be better to initialize the "Tips" array at map init instead of initialize it every time a tip is displayed ^^'

and anyway, why do you use a "if num=1 then display tip[1]; if num=2 then display tip[2] etc..."
it would be simpler to just "display tip[num]" ;)
 
Status
Not open for further replies.
Top