• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Message Conditions

Status
Not open for further replies.
Level 4
Joined
Feb 5, 2020
Messages
51
Is there a way to add a condition that prevents a message from being activated if there's already a bunch of messages being displayed? I have this map where killing certain targets gives a reward, however potentially you could kill several quest targets at the same time spamming the message board. This is more a precaution then a necessity.
 

Uncle

Warcraft Moderator
Level 71
Joined
Aug 10, 2018
Messages
7,587
If Then Else statements are used to run Actions only if certain Conditions are met.

So the logic would be: If My Condition is Equal to (True/False) then Display text message.

For this particular situation you could use a Boolean variable as your condition to prevent the messages from being displayed and a Timer to then reenable the messages after X seconds has passed.

So whenever you want to display a message you would do something like this:
  • Actions
  • If SkipTextMsg is Equal to False then do Actions:
    • Game - Display your text message / Quest message
    • Set Variable SkipTextMsg = True
    • Countdown Timer - Start SkipMsgTimer as a one-shot timer that will expire in 5.00 seconds
After 5.00 seconds the SkipMsgTimer will expire and set SkipTextMsg to False again which will allow a new message to be displayed:
  • Events
    • Time - SkipMsgTimer expires
  • Actions
    • Set Variable SkipTextMsg = False
Note that this single Timer/Boolean approach means it will be shared between all players. You may want to give each player their own Timer/Boolean depending on how your map works. Also, note that when you Start a one-shot Timer that is already running it will simply restart the Timer.
 
Last edited:
Status
Not open for further replies.
Top