Display Text
Jul 11 2008, 12:35 pm
By: mAdnAyze  

Jul 11 2008, 12:35 pm mAdnAyze Post #1



basically whenever i play the map, the text only displays for certain players or 1 player.

I have triggers for taking over bases, right. These base capture triggers (in their actions) have "Create Mojo (Scout) at location "Player check" for "current player." The purpose of this was to make it possible to have another trigger made for Force 1 (all human players), that would display certain text depending on which player owns the "Mojo" (which is created in a seperate isolated area).

I know that Player 1 triggers run first, then Player 2 etc., and checking off Force 1 is the same as making the same trigger for all players in the force. So here are the three triggers that matter:


Trigger("Player 4","Player 5","Player 7"){
Conditions:
Bring("Current Player", "Men", "Base 1", At least, 1);
Bring("Current Player", "Buildings", "Base 1", Exactly, 0);
Actions:
Set Deaths("Player 8", "Zerg Spire", Set To, 21);
Give Units to Player("Foes", "Current Player", "Buildings", All, "Base 1");
Create Unit("Current Player", "Mojo (Scout)", 1, "Display Captured Town, Player Check");
Preserve Trigger();

Trigger("Force 1"){
Conditions:
Deaths("Player 8", "Zerg Spire", Exactly, 21);
Bring("Special Squad Units", "Mojo (Scout)", "Display Captured Town, Player Check", At least, 1);
Actions:
Display Text Message(Always Display, "BAM BAM BAM!");
Minimap Ping("Town, Western Region: Terkay");
Preserve Trigger();

Trigger("Player 7"){
Conditions:
Deaths("Player 8", "Zerg Spire", At least, 1);
Actions:
Set Deaths("Player 8", "Zerg Spire", Set To, 0);
Remove Unit At Location("All players", "Mojo (Scout)", All, "Display Captured Town, Player Check");
Preserve Trigger();

So, my method is have the display trigger run for P1, P2, P3, & P6 (p5 is comp), and then have a trigger for p7 that essentially turns off the display text trigger (so it doesnt run more than once for each player). But it doesnt work!!!!
The text is only displayed to p1 and sometimes p2, but never both or all players. I don't get it! What did I do wrong?? :[

Oh yeah, the Hyper Triggers are for p7 (a comp) and the trigger that turns off the display text trigger IS above the hyper triggers. Please help !



None.

Jul 11 2008, 2:12 pm Echo Post #2



Make a trigger with all the players checked and use current player. Make sure you don't have waits though because that interferes with hyper triggers. You also need a more solidified condition trigger.



None.

Jul 11 2008, 3:55 pm Falkoner Post #3



The problem you are having is that there is an action that when the trigger runs for Player 1, the action runs and then makes the conditions false, so they no longer run for all the other players when it's time for the trigger to run for them. You should have a death count or something that triggers another trigger to display the text message, then have a trigger at the bottom of your trigger list that always resets that switch or death.



None.

Jul 12 2008, 3:04 pm Greo Post #4



Quote from Echo
Make a trigger with all the players checked and use current player. Make sure you don't have waits though because that interferes with hyper triggers. You also need a more solidified condition trigger.
You can use waits on a trigger if it is the only trigger using waits for that player. Aka, if P8 is holding the hyper triggers, you cant use any wait triggers for P8 or it'll screw stuff up.



None.

Jul 12 2008, 3:13 pm Echo Post #5



Quote from Greo
Quote from Echo
Make a trigger with all the players checked and use current player. Make sure you don't have waits though because that interferes with hyper triggers. You also need a more solidified condition trigger.
You can use waits on a trigger if it is the only trigger using waits for that player. Aka, if P8 is holding the hyper triggers, you cant use any wait triggers for P8 or it'll screw stuff up.
That's not true. It still messes up the waits for other players. Hyper triggers are used to speed up all triggers in the map, therefore it affects the time for other triggers. I know this from making that mistake like 4 years ago.



None.

Jul 12 2008, 3:28 pm Doodle77 Post #6



Quote from Falkoner
The problem you are having is that there is an action that when the trigger runs for Player 1, the action runs and then makes the conditions false, so they no longer run for all the other players when it's time for the trigger to run for them. You should have a death count or something that triggers another trigger to display the text message, then have a trigger at the bottom of your trigger list that always resets that switch or death.
His trigger for Force 1 doesn't make the conditions false, and he has a trigger for player 7 that makes the conditions false.



None.

Jul 12 2008, 4:53 pm Greo Post #7



Quote from Echo
That's not true. It still messes up the waits for other players. Hyper triggers are used to speed up all triggers in the map, therefore it affects the time for other triggers. I know this from making that mistake like 4 years ago.
Hyper Triggers work for all triggers, but the reason it messes up is because you can only have one Wait running per player. If you have the Hyper Triggers running under Player 8, then you can't use waits for Player 8 but you can use them for Players 1-7.



None.

Jul 12 2008, 5:43 pm Ahli Post #8

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from Falkoner
The problem you are having is that there is an action that when the trigger runs for Player 1, the action runs and then makes the conditions false, so they no longer run for all the other players when it's time for the trigger to run for them. You should have a death count or something that triggers another trigger to display the text message, then have a trigger at the bottom of your trigger list that always resets that switch or death.

This is the solution for everyone who did not notice that.

If Player 5 captures the town, there is no chance for Player 4 to run the display trigger before Player 7 unsets it.
Trigger order: ... >>> P4 >>> P5 >>> P7 >>> ...
when P5 captures the town, only P5 and P7 get the message. If P4 captures the town, everyone gets it.

I believe that you have multiple towns to capture. So I would suggest that you use a death count of a unit that won't die ingame (e.g. mineral field type 1) to set a display index number for your Force 1 to the index number of your town:

capture town 1 -> set dc to 1 for the force
current player has exactly 1 of that dc -> display and ping at town 1 & set dc to 0 for current player

capture town 2 -> set dc to 2 for the force
current player has exactly 2 of that dc -> display and ping at town 2 & set dc to 0 for current player
.
.
.

Now every player gets that message. (there can still occure one bug, but that one would occure in your old system, too. But it's rare. [capturing 2 towns at the same time] )




Jul 12 2008, 6:32 pm Roy Post #9

An artist's depiction of an Extended Unit Death

Quote from Ahli
This is the solution for everyone who did not notice that.

If Player 5 captures the town, there is no chance for Player 4 to run the display trigger before Player 7 unsets it.
Trigger order: ... >>> P4 >>> P5 >>> P7 >>> ...
when P5 captures the town, only P5 and P7 get the message. If P4 captures the town, everyone gets it.

I believe that you have multiple towns to capture. So I would suggest that you use a death count of a unit that won't die ingame (e.g. mineral field type 1) to set a display index number for your Force 1 to the index number of your town:

capture town 1 -> set dc to 1 for the force
current player has exactly 1 of that dc -> display and ping at town 1 & set dc to 0 for current player

capture town 2 -> set dc to 2 for the force
current player has exactly 2 of that dc -> display and ping at town 2 & set dc to 0 for current player
.
.
.

Now every player gets that message. (there can still occure one bug, but that one would occure in your old system, too. But it's rare. [capturing 2 towns at the same time] )

There's always remedies to that, though. I mean, most maps have at least 20% of SC's units unused; I'm sure you could easily make separate death counters if capturing 2 towns at the exact same time occurs frequently. From what I'm hearing, however, the chances of that are so low that you shouldn't even bother making the triggering any more complex. I, personally, would use Ahli's method; but hey, I'm lazy :P




Jul 12 2008, 6:43 pm Ahli Post #10

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

you could add the condition that everyone out of force 1 has to have exactly 0 deaths of that capture message index number. then the capture adn its message will be delayed a short time.




Jul 12 2008, 6:44 pm Falkoner Post #11



Quote
Quote from Falkoner
The problem you are having is that there is an action that when the trigger runs for Player 1, the action runs and then makes the conditions false, so they no longer run for all the other players when it's time for the trigger to run for them. You should have a death count or something that triggers another trigger to display the text message, then have a trigger at the bottom of your trigger list that always resets that switch or death.
This is the solution for everyone who did not notice that. If Player 5 captures the town, there is no chance for Player 4 to run the display trigger before Player 7 unsets it. Trigger order: ... >>> P4 >>> P5 >>> P7 >>> ... when P5 captures the town, only P5 and P7 get the message. If P4 captures the town, everyone gets it. I believe that you have multiple towns to capture. So I would suggest that you use a death count of a unit that won't die ingame (e.g. mineral field type 1) to set a display index number for your Force 1 to the index number of your town: capture town 1 -> set dc to 1 for the force current player has exactly 1 of that dc -> display and ping at town 1 & set dc to 0 for current player capture town 2 -> set dc to 2 for the force current player has exactly 2 of that dc -> display and ping at town 2 & set dc to 0 for current player . . . Now every player gets that message. (there can still occure one bug, but that one would occure in your old system, too. But it's rare. [capturing 2 towns at the same time] )
Quote from Falkoner
The problem you are having is that there is an action that when the trigger runs for Player 1, the action runs and then makes the conditions false, so they no longer run for all the other players when it's time for the trigger to run for them. You should have a death count or something that triggers another trigger to display the text message, then have a trigger at the bottom of your trigger list that always resets that switch or death.

This is the solution for everyone who did not notice that.

If Player 5 captures the town, there is no chance for Player 4 to run the display trigger before Player 7 unsets it.
Trigger order: ... >>> P4 >>> P5 >>> P7 >>> ...
when P5 captures the town, only P5 and P7 get the message. If P4 captures the town, everyone gets it.

I believe that you have multiple towns to capture. So I would suggest that you use a death count of a unit that won't die ingame (e.g. mineral field type 1) to set a display index number for your Force 1 to the index number of your town:

capture town 1 -> set dc to 1 for the force
current player has exactly 1 of that dc -> display and ping at town 1 & set dc to 0 for current player

capture town 2 -> set dc to 2 for the force
current player has exactly 2 of that dc -> display and ping at town 2 & set dc to 0 for current player
.
.
.

Now every player gets that message. (there can still occure one bug, but that one would occure in your old system, too. But it's rare. [capturing 2 towns at the same time] )

Oh man, why haven't I ever thought of using Current Player? Glad to have heard that, it will help out quite a bit in a few maps of mine, because I've tried setting a death count to the number of players, and then if it's at least 1, subracting 1 from it and displaying the message, but that caused problems if people left, thanks for posting that :)



None.

Jul 12 2008, 7:59 pm mAdnAyze Post #12



Hey, thanks a lot for all your ideas and help. I have now found the answer to my problem though :\. It's not exactly what I wanted, but it works.

Quote
Trigger("Force 1"){
Conditions:
Deaths("Player 8", "Zerg Spire", Exactly, 21);
Bring("Special Squad Units", "Mojo (Scout)", "Display Captured Town, Player Check", At least, 1);
Actions:
Display Text Message(Always Display, "BAM BAM BAM!");
Minimap Ping("Town, Western Region: Terkay");
Preserve Trigger();

Trigger("Player 7"){
Conditions:
Deaths("Player 8", "Zerg Spire", At least, 1);
Actions:
Set Deaths("Player 8", "Zerg Spire", Set To, 0);
Remove Unit At Location("All players", "Mojo (Scout)", All, "Display Captured Town, Player Check");
Preserve Trigger();

I modified both these triggers, and now they're like this:

Trigger("Player 8"){
Conditions:
Deaths("Player 8", "Zerg Spire", At least, 1);
Actions:
Wait(100);
Set Deaths("Player 8", "Zerg Spire", Set To, 0);
Remove Unit At Location("All players", "Mojo (Scout)", All, "Display Captured Town, Player Check");
Set Deaths("Special Squad Units", "Zerg Extractor", Set To, 0);
Preserve Trigger();

Trigger("Force 1"){
Conditions:
Deaths("Player 8", "Zerg Spire", Exactly, 21);
Bring("Special Squad Units", "Mojo (Scout)", "Display Captured Town, Player Check", At least, 1);
Deaths("Current Player", "Zerg Extractor", Exactly, 0);
Actions:
Display Text Message(Always Display, "BAM BAM BAM!");
Set Deaths("Current Player", "Zerg Extractor", Set To, 1);
Minimap Ping("Town, Western Region: Terkay");
Preserve Trigger();

I knew now that the display triggers DID work, they just weren't being given enough time to run. So instead of disabling the display triggers all at once for all players in a trigger for player 7, i made it so each display trigger turned off after being run for the specific player, and just put a wait of 100 milleseconds before the reseting of the death counts. 100 milleseconds for all the display triggers for all the players to run. I realize that the wait could be lower, I was just being carful :\.

And i put the last trigger for player 8 instead of 7 cuz it has a wait and player 7 has hypers... so yeah...
I kinda don't like having that wait there just cause i don't like waits... but it works and i don't want to waste too much time on text issues.

anyway thanks a lot, problem solved :)



None.

Jul 12 2008, 8:07 pm Falkoner Post #13



Well, the reason why adding that wait is working, is because the conditions are not made false for the other players, until the next trigger loop, each player gets their own set of waits, so they can all run before the conditions become false. You could make it a wait 0 and it would go faster and still work.

Oh wait, read it wrong, the wait in your triggers is completely unnecessary, I believe if you just changed the order around, it would work fine, the wait allowed the conditions of the other trigger to be read before they were reset, since the trigger order was wrong.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:56 pm]
Ultraviolet -- Also as Nude pointed out, it's incredibly cheap to add one even if you don't already have it. Doesn't seem like there's a good reason to go with an old style SATA SSD these days.
[10:52 pm]
Ultraviolet -- dumbducky
dumbducky shouted: "almost ten years old"
5+5 also = 10. Are you sure your mobo doesn't have the m.2 port for an NVMe drive? My previous mobo which would be about 10 years old at this point had one
[10:43 pm]
NudeRaider -- NudeRaider
NudeRaider shouted: dumbducky There's always a risk, sure, but I wouldn't actually expect it unless you ran a server on it or something. They are way more durable than HDDs.
my Samsung 830 from 13 years ago is still working, though not being used much anymore, admittedly.
[10:39 pm]
NudeRaider -- so you should be thinking about a backup, not a replacement.
[10:39 pm]
NudeRaider -- dumbducky
dumbducky shouted: Attention nerds: my old SSD is almost ten years old and probably at risk of dying in the next year, I assume. What's a good 2.5" SATAIII replacement as cheap as possible? Must be at least 250GB (do they make them that small still?)
There's always a risk, sure, but I wouldn't actually expect it unless you ran a server on it or something. They are way more durable than HDDs.
[10:36 pm]
NudeRaider -- dumbducky
dumbducky shouted: Attention nerds: my old SSD is almost ten years old and probably at risk of dying in the next year, I assume. What's a good 2.5" SATAIII replacement as cheap as possible? Must be at least 250GB (do they make them that small still?)
a mainboard that old will need replacement in the foreseeable future anyway, so for 11 Bucks you can add an m.2 port to it and get an actually good SSD that you can take over to a new pc.
[10:23 pm]
Moose -- There are cheaper ones but I don't know the brands tbh
[10:23 pm]
Moose -- Kingston A400 240GB ~$28?
[10:20 pm]
Moose -- WD Blue 250 is $40, that would probably meet "good" but not "as cheap as possible"
[09:15 pm]
dumbducky -- "almost ten years old"
Please log in to shout.


Members Online: O)FaRTy1billion[MM]