Trigger Order
May 26 2008, 5:11 am
By: Cardanis  

May 26 2008, 5:11 am Cardanis Post #1



So, there's probly a list of this somewhere already, but I can't seem to find it. Whats the order for trigger activation? I know it goes players 1-8,and that All players jsut runs through all the players starting from 1-8 etc. However, does the All players append their triggers on the end of the players triggers? or run in a subset of its own?

Like, would it go through player 1 triggers, then the all players triggers, then player 2, all players for player 2, etc

Or does it go, player 1, player 2, player 3 etc, then all players player 1, all players player 2, etc

(this probly seems incredibly confusing, couldnt think of a better way to describe it)



None.

May 26 2008, 5:32 am Wormer Post #2



http://www.staredit.net/50794/
Quote from Wormer
SC handles triggers exactly like this.
Let's assume you've listed triggers in the next order (from top to bottom in your text file) T1(PlayersGroup1), T2(PG2), ... , Tn(PGn), where Ti is a trigger and PGi is a group of players you've set the trigger Ti to. SC chooses the first player P1 to be current player (cp = P1) and goes through the triggers sequence checking if P1 belongs to PGi, where i is the number of the trigger being currently checked. If P1 belongs to the group PGi (P1 IN PGi) then it is checking all triggers' Ti conditions Ci and If all conditions Ci are met it is executing actions Ai. After all triggers in the seqence are checked for P1 it chooses the next computer or human player still remaning in the game, makes him current player (pc = P2) and checks triggers for him.

Code
FOR j = 1 TO 8 DO
    cp = Pj
    FOR i = 1 TO n DO
        IF Pj IN PGi THEN
            Execute Ti with current player = cp
    ENDFOR
ENDFOR


For example:
The sequence of triggers T1(P1,P3) T2(AllPlayers) T3(P2,P3) with three players P1, P2 and P3 remaining in the game would be actually checked each loop in the next particularly order: T1(P1), T2(P1), T2(P2), T3(P2), T1(P3), T2(P3), T3(P3), where players in braces shows the (current) player the trigger is executed for at the moment.




Some.

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: NudeRaider, Zincoshine, JohnnyTheWolf