Advancing Message Timed Display? +REP

Julian4life

New Member
Reaction score
7
For the map i am making, there will be warning when the enemy passes a region, and it'll say "The enemy has advanced pass first defense!"


It'll be whenever any unit walks onto this region (Holy Advance1), but since there will be hundreds of units that may walk over it at the same time, i dont want the warning to be spammed.

So... Does anyone know how i can have it so that the message will be displayed MAX of once every 2 minutes?

(I know how to trigger the message, but not sure how to limit how many times it'll be said.)

And of course, +REP will be gladly awarded.
 

darkbeer

Beer is Good!
Reaction score
84
Code:
Events - Enters rect
Condition - Rect = ur Rect
Actions - 
Display Message
Turn off this Trigger
Wait "UR AMOUNT"(e.g. 120 secs)
Turn on this Trigger

simple isnt it? :)
 

Julian4life

New Member
Reaction score
7
lol. very.

But, a lil extra thing i could use help for... Can i make it so its only when the opposing player enters? Like i dont want my own unit crossing it and it saying "They are advancing!" lol

+REP'd.


thanks, didnt realize i could have used an on/off trigger for it. :p
 

Galdiuz

Creator of Photon Command
Reaction score
98
add condition that checks owner of entering unit. If you wait a min, i'll look it up for you.
Edit: Here, i found it.
Code:
Conditions
    Or - Any (Conditions) are true
        Conditions
            (Owner of (Triggering unit)) Equal to Player 1 (Red)
Like that. Do that for every player, so if player 1-6 is enemies, you put in one for each of them.
 

darkbeer

Beer is Good!
Reaction score
84
do you mean sth. like this?

Code:
Unbezeichneter Auslöser 001
    Ereignisse
        Einheit - A unit enters Gebiet 000 <gen>
    Bedingungen
    Aktionen
        Spiel - Display to (All enemies of (Owner of (Triggering unit))) the text: AN ENEMY HAS PASSED...
        Auslöser - Turn off (This trigger)
        Wait 120.00 seconds
        Auslöser - Turn on (This trigger)

will display the message only to enemies of the entering unit

EDIT: @ Galdiuz: I get what you mean^^ my mistake .... this will only display a message to one force every 2 minutes not one to each force every 2 minutes, seems that there is a need for an if :)
 

Galdiuz

Creator of Photon Command
Reaction score
98
You got it wrong, he wanted the trigger to run only when an opposing unit entered.
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
You got it wrong, he wanted the trigger to run only when an opposing unit entered.

YOU got it wrong
you did a player condition
when it's a boolean
Code:
Untitled Trigger 001
    Events
    Conditions
        ((Triggering player) is an enemy of Player 1 (Red)) Equal to True
    Actions
That's under boolean comparision, you have to scroll up after clicking triggering unit is a structure
EDIT you could easily have done this
Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player number of (Triggering player)) Less than or equal to 6
            Then - Actions
                Game - Display to (All players) the text: TEXT
            Else - Actions
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
Yes, i just found it. However, my version worked too. ._.

yes but no one likes making a condition for every player
blizzard probably already knew that and thought it was a pain in the ass
 

Julian4life

New Member
Reaction score
7
Thanks YourFace (And galdiuz).

And thats EXACTLY what i was looking for YourFace :p
Didnt really wanna have to make it for 6 players ._.

Both +rep'd
 

Julian4life

New Member
Reaction score
7
Okay, just a check. I need everything you guys posted here, and i need it so it doesnt display the message more than once a minute, so, just checking if this has any flaws.

EDIT: Made it easier to read.

Unholy Advance1
. .Events
. . . . .Unit - A unit enters Unhloly Advance 1 <gen>
. .Conditions
. . . . .((Triggering player) is an enemy of Player 1 (Red)) Equal to True
. .Actions
. . . . .If (All Conditions are True) then do (Then Actions) else do (Else Actions)
. . . . . . .If - Conditions
. . . . . . . . .(Player number of (Triggering player)) Greater than or equal to 7
. . . . .Then - Actions
. . . . . . . . .Game - Display to (All players) the text: The Unholy Forces h...
. . . . . . . . .Trigger - Turn off (This trigger)
. . . . . . . . .Wait 120.00 seconds
. . . . . . . . .Trigger - Turn on (This trigger)
. . . . .Else - Actions
 

Galdiuz

Creator of Photon Command
Reaction score
98
you don't need the playernumber greater than 7 thing, nor the If/Then/Else
Code:
Unholy Advance1
. .Events
. . .Unit - A unit enters Unhloly Advance 1 <gen>
. .Conditions
. . .((Triggering player) is an enemy of Player 1 (Red)) Equal to True
. .Actions
. . .Game - Display to (All players) the text: The Unholy Forces h...
. . .Trigger - Turn off (This trigger)
. . .Wait 120.00 seconds
. . .Trigger - Turn on (This trigger)
. .Else - Actions
Make it look like this. Also, does the '(Triggering player)' works? I normally use 'Owner of (triggering unit)'
 

Julian4life

New Member
Reaction score
7
Oh, right. Forgot to tell you one other thing i wanted to add.

There are three advancing regions.
If a unit is in any of the other two, it will not display the message.

And speaking of that, how can i get that to work? This is the closest thing i found to it. But im not entirely sure it will work in this situation.

(Unholy Advance 2 <gen> contains (Position of (Entering unit))) Not equal to True
 

Curo

Why am I still playing this game...?
Reaction score
109
Code:
Unit enters advancing region 2
--> turn advancing region 1 trigger off
Code:
Unit leaves advancing region 2
--> if number of units belonging to an ally of (owner of (triggering unit)) in advancing region 2 = 0
--> then turn advancing region 1 trigger on

This is assuming you want to reuse it. If once units enter the second region, they will no longer be entering the first region, then you can just turn it off and leave it off.

Also, it may be easier to have a trigger for each force...either that or a bunch of if/then's which can get confusing. By the way, I gave you a concept, not a trigger. Just so you can understand.
 
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