• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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.
 
Level 16
Joined
Jun 9, 2008
Messages
734
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