1. Open the variable editor and create a string array.
2. Create a trigger that runs on map initialization. Set each of the array elements to a hint. For example:
3. Create another trigger that runs every X seconds. You would do something like this:
Set RandomHint[0] = This map was made by Allain55X!
Set RandomHint[1] = Visit the HiveWorkshop.com for more cool things.
You would change the 5 in "(Random integer number between 0 and 5)" to the highest array element (total amount of hints).
Trigger
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
Game - Display to (All players) the text: RandomHint[(Random integer number between 0 and 5)]
Here's a simple method so that you don't get the same message twice. When all messages have been displayed, it then resets the list and displays them in random order.
I used poor variable names, you can use some better ones.
Untitled Trigger 014
Events
Map initialization
Conditions
Actions
Set new[0] = 1
Set new[1] = 2
Set new[2] = 3
Set new[3] = 4
// 3 is the index of the last hint
For each (Integer A) from 0 to 3, do (Actions)
Loop - Actions
Set new[(1000 + (Integer A))] = new[(Integer A)]
Set i1 = 3
Untitled Trigger 018
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
Set i = (Random integer number between 0 and i1)
// Use hint message instead of Game - display...
Game - Display to Player Group - Player 1 (Red) the text: new[i]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
i1 Equal to 0
Then - Actions
For each (Integer A) from 0 to 3, do (Actions)
Loop - Actions
Set new[(Integer A)] = new[(1000 + (Integer A))]
Set i1 = 3
Else - Actions
Set new[i] = new[i1]
Set i1 = (i1 - 1)
Just remember that with mine, the same hint could display a few times in a row. With Maker's tutorial, hints will only be displayed once (as he explained).
TY mR.Bean very helpful! +REP!![]()
^ String array to hold the hints? What do you mean by "trigger type"? There is only one trigger type? o.0
String variable, array.