Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How to organize the triggers?
How to organize the triggers?
May 28 2009, 3:16 am
By: LhaN  

May 28 2009, 3:16 am LhaN Post #1



Well, I am almost finished my first map, and now I encounter a serious problem when at copy and modify the trigger from player 1 to other players, (in notepad++ where it says Player 1 change by Player 2, Player 3...) its have been messy as follows.
Triggers Force 1.
Triggers Player 8.
Triggers Player 1.
Triggers Player 2.
Triggers Player 3.
Triggers Player 4.
Triggers Player 5.
Triggers Player 6.
Triggers Player 7.

The right thing is an interspersed of triggers of all subgroups to work properly.

As I do? by hand, moving the text block (in notepad++ or triggedit) or trigger individual (in triggers, some move up and others move down) to its correct position ... or is there some other program that can get me out of trouble?



None.

May 28 2009, 3:31 am rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

MindArchon said he would make a program for me, but he never got around to it.

FYI, triggers run player 1 - 8, in that order. If two triggers are run by player 1, they are run in the order of the triggers. Even though you have player 8 listed first there, it won't run until after player 7's triggers run, no matter where you put them.

For now, you'll have to just organize them however you can.

If you want to try your hand at getting around that, try replacing line breaks with a non-line break character (like @). Then, when you get each individual trigger on one line, open it up in excel, use the sort function, and you'll have them in alphabetical order. Drop them back into notepad and replace the line breaks again.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 28 2009, 7:08 am Vrael Post #3



Quote from LhaN
Well, I am almost finished my first map, and now I encounter a serious problem when at copy and modify the trigger from player 1 to other players, (in notepad++ where it says Player 1 change by Player 2, Player 3...) its have been messy as follows. Triggers Force 1. Triggers Player 8. Triggers Player 1. Triggers Player 2. Triggers Player 3. Triggers Player 4. Triggers Player 5. Triggers Player 6. Triggers Player 7. The right thing is an interspersed of triggers of all subgroups to work properly. As I do? by hand, moving the text block (in notepad++ or triggedit) or trigger individual (in triggers, some move up and others move down) to its correct position ... or is there some other program that can get me out of trouble?
Umm, no offense, but try using English? I have no idea what you're asking about. What are you trying to do? You want to copy a trigger set from player 1 to another player, but what's the problem exactly? What's happening, what does that list mean, and what do you want to happen? Can you show an example?

Copy and Paste (ctrl+c & ctrl+v) tends to be very useful when dealing with text triggers, as I'm sure you know, but beyond that I don't know how to help you.



None.

May 28 2009, 3:59 pm Falkoner Post #4



Quote
Umm, no offense, but try using English?

He's not an English speaker, apparently he's using Google Translate for a lot of the words, so while maybe he can try a bit harder, there is a reason for his bad grammar.

However, I think rockz answered his question.



None.

May 28 2009, 4:19 pm LhaN Post #5



Quote from Falkoner
Quote
Umm, no offense, but try using English?

He's not an English speaker, apparently he's using Google Translate for a lot of the words, so while maybe he can try a bit harder, there is a reason for his bad grammar.

However, I think rockz answered his question.

Yes... absolutely yes. Excuse me for a bad using of english. If not exist program for this operation, maybe I can do one in C#, in thanks for help they gave in my first map with SCMDraft.



None.

May 28 2009, 6:00 pm Vrael Post #6



Quote from LhaN
Quote from Falkoner
Quote
Umm, no offense, but try using English?
He's not an English speaker, apparently he's using Google Translate for a lot of the words, so while maybe he can try a bit harder, there is a reason for his bad grammar. However, I think rockz answered his question.
Yes... absolutely yes. Excuse me for a bad using of english. If not exist program for this operation, maybe I can do one in C#, in thanks for help they gave in my first map with SCMDraft.
Well it wasn't really the grammar I was worried about, just that I don't understand what the problem is/was. Maybe someone else can explain it to me? Even if it was answered already, I'd still like to know.



None.

May 28 2009, 6:05 pm Falkoner Post #7



Basically, he was saying that he was having issues when he was copying triggers to modify them for different players, he was mostly just wondering whether there was a way to more easily change triggers over to other players, without having to do it all manually.



None.

May 28 2009, 7:42 pm LhaN Post #8



The problem with an example:

Trigger for Player 8: Inicialization and set deathcounters for AI.
Trigger for Player 8: Countdown timer set to 30.
Trigger for Player 8: Hyper, Hyper, Hyper, Hyper.
Trigger for Force 1: Inicialization and set deathcounters for cash and other things.
Trigger for Force 1: Time to time, give to current player cash per X kills depending on the type of hydra killing.
Trigger for Player 1: Dependig of total kills for current player create X amount of hydras in location HydrasP1.
Trigger for Player 1: If current player move to anywhere 1 SVC, move location SVCP1 to anywhere.
Trigger for Player 1: If current player command at least 1 firebat, move 1 firebat to location SVCP1.
Trigger for Player 1: If current player kill 10 hydras, create 1 Duran at location HydrasP1.
Trigger for Player 8: Reduce deathcounter for AI.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP1 attack location SCVP1.
Trigger for Force 1: Set victory conditions.
Trigger for Force 1: Set defeat conditions.

When copy and modify the triggers... the order is:
Trigger for Player 8: Inicialization and set deathcounters for AI.
Trigger for Player 8: Countdown timer set to 30.
Trigger for Player 8: Hyper, Hyper, Hyper, Hyper.
Trigger for Force 1: Inicialization and set deathcounters for cash and other things.
Trigger for Force 1: Time to time, give to current player cash per 3 kills depending on the type of enemy units kill.
Trigger for Player 1: Dependig of total kills for current player, decreace kills and create X amount of hydras in location HydrasP1.
Trigger for Player 1: If current player move to anywhere 1 SVC, move location SVCP1 to anywhere.
Trigger for Player 1: If current player command at least 1 firebat, move 1 firebat to location SVCP1.
Trigger for Player 1: If current player kill 10 hydras, create 1 Duran at location HydrasP1.
Trigger for Player 8: Reduce deathcounter for AI.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP1 attack location SCVP1.
Trigger for Force 1: Set victory conditions.
Trigger for Force 1: Set defeat conditions.
Same trigger for Player 1 but with "for Player 2", locations HydrasP2, SVCP2.
Same trigger for Player 1 but with "for Player 3", locations HydrasP3, SVCP3.
Same trigger for Player 1 but with "for Player 4", locations HydrasP4, SVCP4.
Same trigger for Player 1 but with "for Player 5", locations HydrasP5, SVCP5.
Same trigger for Player 1 but with "for Player 6", locations HydrasP2, SVCP6.
Same trigger for Player 1 but with "for Player 7", locations HydrasP7, SVCP7.

That's messy. First Players need kill any hydra, second give to player mineral, third create enemy units... and then execute AI orders, when exist enemy units. Is for more efficient implementation. I hope this time I could have explained clearly my issue.

Post has been edited 1 time(s), last time on May 28 2009, 7:47 pm by LhaN.



None.

May 28 2009, 11:41 pm Falkoner Post #9



I think the line that's the most confusing is "Is for more efficient implementation", it just doesn't make much sense.

But basically, you're saying that you don't like how the triggers are ordered when you copy and paste the triggers in a single block, and to get them the way you want you'd have to copy each trigger one at a time, am I correct?



None.

May 29 2009, 1:00 am LhaN Post #10



No, trying say that I want sort the triggers in an order consistent with the actions they perform.
Quote from First group of triggers
Trigger for Player 8: Inicialization and set deathcounters for AI.
Trigger for Player 8: Countdown timer set to 30.
Trigger for Player 8: Hyper, Hyper, Hyper, Hyper.
Trigger for Force 1: Inicialization and set deathcounters for cash and other things.
Trigger for Force 1: Time to time, give to current player cash per X kills depending on the type of hydra killing.
Trigger for Player 1: Dependig of total kills for current player create X amount of hydras in location HydrasP1.
Trigger for Player 1: If current player move to anywhere 1 SVC, move location SVCP1 to anywhere.
Trigger for Player 1: If current player command at least 1 firebat, move 1 firebat to location SVCP1.
Trigger for Player 1: If current player kill 10 hydras, create 1 Duran at location HydrasP1.
Trigger for Player 8: Reduce deathcounter for AI.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP1 attack location SCVP1.
Trigger for Force 1: Set victory conditions.
Trigger for Force 1: Set defeat conditions.

With the firs group of triggers, the map it's functional only for Player 1. So, I need copy all trigger from Player 1 to other players (2-7) right?
After copy and modify the result is:
Quote from Second group of triggers
Trigger for Player 8: Inicialization and set deathcounters for AI.
Trigger for Player 8: Countdown timer set to 30.
Trigger for Player 8: Hyper, Hyper, Hyper, Hyper.
Trigger for Force 1: Inicialization and set deathcounters for cash and other things.
Trigger for Force 1: Time to time, give to current player cash per X kills depending on the type of hydra killing.
Trigger for Player 1: Dependig of total kills for current player create X amount of hydras in location HydrasP1.
Trigger for Player 1: If current player move to anywhere 1 SVC, move location SVCP1 to anywhere.
Trigger for Player 1: If current player command at least 1 firebat, move 1 firebat to location SVCP1.
Trigger for Player 1: If current player kill 10 hydras, create 1 Duran at location HydrasP1.
Trigger for Player 8: Reduce deathcounter for AI.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP1 attack location SCVP1.
Trigger for Force 1: Set victory conditions.
Trigger for Force 1: Set defeat conditions.
//Here begins triggers for player 2
Trigger for Player 2: Dependig of total kills for current player create X amount of hydras in location HydrasP2.
Trigger for Player 2: If current player move to anywhere 1 SVC, move location SVCP2 to anywhere.
Trigger for Player 2: If current player command at least 1 firebat, move 1 firebat to location SVCP2.
Trigger for Player 2: If current player kill 10 hydras, create 1 Duran at location HydrasP2.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP2 attack location SCVP2.
//and for player 3
Trigger for Player 3: Dependig of total kills for current player create X amount of hydras in location HydrasP3.
Trigger for Player 3: If current player move to anywhere 1 SVC, move location SVCP3 to anywhere.
Trigger for Player 3: If current player command at least 1 firebat, move 1 firebat to location SVCP3.
Trigger for Player 3: If current player kill 10 hydras, create 1 Duran at location HydrasP3.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP3 attack location SCVP3.
...
//to player 7
Trigger for Player 7: Dependig of total kills for current player create X amount of hydras in location HydrasP7.
Trigger for Player 7: If current player move to anywhere 1 SVC, move location SVCP7 to anywhere.
Trigger for Player 7: If current player command at least 1 firebat, move 1 firebat to location SVCP7.
Trigger for Player 7: If current player kill 10 hydras, create 1 Duran at location HydrasP7.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP7 attack location SCVP7.
But this ordering of triggers is inefficient. At first cycle of triggers, only running AI for the units in HydrasP1, in other locations HydrasP* no unit. This is the first occasion but not the last, where happens the "problem". Right?

After sort, the result would be:
Quote from Correct group of triggers
Trigger for Player 8: Inicialization and set deathcounters for AI.
Trigger for Player 8: Countdown timer set to 30.
Trigger for Player 8: Hyper, Hyper, Hyper, Hyper.
Trigger for Force 1: Inicialization and set deathcounters for cash and other things.
Trigger for Force 1: Time to time, give to current player cash per X kills depending on the type of hydra killing.
//For player 1
Trigger for Player 1: Dependig of total kills for current player create X amount of hydras in location HydrasP1.
Trigger for Player 1: If current player move to anywhere 1 SVC, move location SVCP1 to anywhere.
Trigger for Player 1: If current player command at least 1 firebat, move 1 firebat to location SVCP1.
Trigger for Player 1: If current player kill 10 hydras, create 1 Duran at location HydrasP1.
//For player 2
Trigger for Player 2: Dependig of total kills for current player create X amount of hydras in location HydrasP2.
Trigger for Player 2: If current player move to anywhere 1 SVC, move location SVCP2 to anywhere.
Trigger for Player 2: If current player command at least 1 firebat, move 1 firebat to location SVCP2.
Trigger for Player 2: If current player kill 10 hydras, create 1 Duran at location HydrasP2.
//For player 3
Trigger for Player 3: Dependig of total kills for current player create X amount of hydras in location HydrasP3.
Trigger for Player 3: If current player move to anywhere 1 SVC, move location SVCP3 to anywhere.
Trigger for Player 3: If current player command at least 1 firebat, move 1 firebat to location SVCP3.
Trigger for Player 3: If current player kill 10 hydras, create 1 Duran at location HydrasP3.
...
//to player 7
Trigger for Player 7: Dependig of total kills for current player create X amount of hydras in location HydrasP7.
Trigger for Player 7: If current player move to anywhere 1 SVC, move location SVCP7 to anywhere.
Trigger for Player 7: If current player command at least 1 firebat, move 1 firebat to location SVCP7.
Trigger for Player 7: If current player kill 10 hydras, create 1 Duran at location HydrasP7.
//And now...
Trigger for Player 8: Reduce deathcounter for AI.
//For each player from 1 to 7
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP1 attack location SCVP1.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP2 attack location SCVP2.
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP3 attack location SCVP3.
...
Trigger for Player 8: If deathcounter for AI is 0, set to 15, order all units at location HydrasP7 attack location SCVP7.
Trigger for Force 1: Set victory conditions.
Trigger for Force 1: Set defeat conditions.

You can see the difference in order of triggers and my issue?
Is too harder put each trigger at his correct position for a efficient run.



None.

May 29 2009, 1:56 am Falkoner Post #11



Why is it inefficient to have it that way, is it just that way from your perspective, or is it less efficient in the gameplay?



None.

May 29 2009, 2:55 am LhaN Post #12



Well, I think... (really don't know), if you have too many triggers and use wait 0 for hypers, may cause too much lag, if you use a wait > 0 for 2 or 3 or 4 cycles per second for run triggers, may cause low reaction of events. Maybe I'm wrong... I'm just a junior programmer, and I know very little how triggers work, just what I have read here, but I have that idea of situation.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: DarkenedFantasies