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.
[2024-5-20. : 3:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[2024-5-20. : 4:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[2024-5-20. : 4:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
[2024-5-20. : 3:57 am]
Sylph-Of-Space -- Unless I'm dum (possible)
[2024-5-20. : 3:57 am]
Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
[2024-5-20. : 3:53 am]
Sylph-Of-Space -- :'( dont cry for me cat-gentina
[2024-5-19. : 9:18 pm]
Ultraviolet -- 🔪🐈
[2024-5-19. : 12:34 pm]
NudeRaider -- curiosity kills the cat!
Please log in to shout.


Members Online: lil-Inferno, Roy