Tutorial How to make ingame Hints/tips

Hot

New Member
Reaction score
9
How to make ingame Hints




Hello!
This is a very easy tutorial and you dont need so much experience in WE, You just need some basics skills :thup:
In this tutorial u can learn how to make ingame hints that will appear in Order u will also be able to turn off/on

Okay lets get started
Before triggering we need to make some variables (Click F4 and then Ctrl+B)
then click "New Variable"

First lets make an Array varible of type "string"
When you are done u can start writing your Hints/tips

Example:
Trigger:
  • Install
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set InGameHints[1] = Hellow!
      • Set InGameHints[2] = TheHelper is a nice website
      • Set InGameHints[3] = Zomg!



Now for our second varibale we will make an Intger Array Varible
name it HintCount or something like that. This varible will show the next hint
if we didnt have this varrible the game will show tip 1 all the time :p

Trigger:
  • Install
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set HintCount[1] = 0
      • Set HintCount[2] = 0


Note: The value in [X] should be equal to the players player number
So if u have 3 player in your game Red Orange and brown. Red=[1] Orange=[6] and Brown=[12]




so Know we need another Intger Array varible name it TurnOnOff.
as the name says it used to turn on and off your Hints/tips but more to that later
Set the Value of TurnOnOff[X] Equal to players player number as in "HintCount"


If u want your Hints/Tips come in an Order example Hint[1],Hint[2]...
u might want to reset Hints when all hints has benn showed or turn them off

If so we need to make an third Varible Intger Array. name it Last_Hint
Trigger:
  • Install
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Last_hint[1] = 3
      • Set Last_hint[2] = 3

Note: if u have 5 Hints the Value of "Last_Hint[X] should be equal to 5 but in this case i have 3 tips so the value is 3

So now we have all varibles we need.
The "Initialization" trigger should be something like this now
Trigger:
  • Install
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Setting amount of hints... --------
      • Set InGameHints[1 = Hellow!
      • Set InGameHints[2 = TheHelper is a nice website
      • Set InGameHints[3 = Zomg!
      • -------- --------------------------------------------------------------------------- --------
      • Set Last_hint[1] = 3
      • Set Last_hint[2] = 3
      • -------- --------------------------------------------------------------------------- --------


Now lets make the trigger that Shows the Hints/Tips

Trigger:
  • Time - Every 5.00 seconds of game time

Set this to Every X seconds of your choice.
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions

Create X amounts of If/then/else equal to amount of player
Now after the first event we need a Condition that checks if the Player has Hints/Tips On/Off
with this Condition:
Trigger:
  • TurnOnOff[1] Equal to 0

Note: 0=On,Greater than 0=Off. And this Condiont only checks for Player Red
If u want it to check for player blue to do like this:
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TurnOnOff[1] Equal to 0
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TurnOnOff[2] Equal to 0
        • Then - Actions
        • Else - Actions

Now we need an Action if the Hints are on for Player Red for example
Trigger:
  • Game - Display to Player Group - Player 1 (Red) for 1.00 seconds the text: InGameHints[HintCount[1]]

now the hint has been showed for player red and next time we want to show Hint 2 then,3,4...
to do this we need an action that sets the Value of HintCount+1

What HintCount do is like this If the Value of HintCount is 1 it will show Hint 1 In this Case "Hellow!" so when we set it +1 it will show Hint 2
Trigger:
  • Set HintCount[1] = (HintCount[1] + 1)


Note: In this case this is player red so HintCount must be [1]
if u want another player make it [2]

So it should look something like this:
Trigger:
  • Show Hint
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TurnOnOff[1] Equal to 0
        • Then - Actions
          • -------- Trigger For player Red --------
          • Game - Display to Player Group - Player 1 (Red) for 1.00 seconds the text: InGameHints[HintCount[1]]
          • Set HintCount[1] = (HintCount[1] + 1)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TurnOnOff[2] Equal to 0
        • Then - Actions
          • -------- Trigger For player Blue --------
          • Game - Display to Player Group - Player 2 (Blue) for 1.00 seconds the text: (Hints [ + ((String(HintCount[2])) + (] + InGameHints[HintCount[2]])))
          • Set HintCount[2] = (HintCount[2] + 1)
        • Else - Actions

So this trigger will show the Hints/Tips and now for a very short and easy trigger to turn Off/On. We need 2 triggers 1 for On and 1 for Off
The event should be like this
Trigger:
  • Player - Player 1 (Red) types a chat message containing -Hints off as An exact matchPlayer
Trigger:
  • Player - Player 2 (Blue) types a chat message containing -Hints off as An exact match


so this event is for turning Off make another 1 but change "off" to On.
As i said Early if TurnOffOn[X]=0 Hints are on if its greater than 0 its off
so what we will do is that when a player types -Hints Off we set TurnOffOn[X] Greater than 0 and when a player types -Hints on we set it to 0 again.
Trigger:
  • Player - Player 1 (Red) types a chat message containing -Hints on as An exact match

Trigger:
  • Set TurnOnOff[(Player number of (Triggering player))] = (Player number of (Triggering player))
This is for turn off
Trigger:
  • Set TurnOnOff[(Player number of (Triggering player))] = 0
This is for turn On

Trigger:
  • Reset Hints
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Last_hint[1] Equal to 3
        • Then - Actions
          • Set Last_hint[1] = 1
        • Else - Actions
This trigger will Reset the Hints when all hints have been showed(the value Last_hint[X] should be equal to amount tips
so this is all from me Thx for reading :rolleyes:


If u see anything thats wrong or can be improved feel free to tell
 

Attachments

  • Tips.w3x
    17.3 KB · Views: 247
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top