program flow
Jan 19 2009, 6:48 am
By: alexpnd  

Jan 19 2009, 6:48 am alexpnd Post #1



sorry for any redundancy... i just want to be clear on how these triggers fire. its from player 1-8 , top to bottom. then forces top to bottom?



None.

Jan 19 2009, 8:55 am midget_man_66 Post #2



I'm pretty sure. that's how it works.



None.

Jan 19 2009, 9:30 am Wormer Post #3



There is a full answer to the question:
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.

In case you dont understand something you could look through the whole topic, before asking questions there.

And please note that forces are Player Groups. Triggers are not checked for forces.



Some.

Jan 19 2009, 1:54 pm NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from alexpnd
sorry for any redundancy... i just want to be clear on how these triggers fire. its from player 1-8 , top to bottom. then forces top to bottom?
Forces do not exist during runtime of the map.
Sc splits Force/All Player triggers up and makes a copy for each present player.
So first are ALL triggers owned by P1 fired, including the triggers of his force and of all players.
Then those of P2, etc.
If you want to see the firing order of all of P1's triggers in the editor you have to ctrl-select P1, his force, and All Players.

Btw. this question has been asked (and answered) many times already, so please make sure you use the search before posting. It's part of the posting rules!




Jan 19 2009, 2:59 pm alexpnd Post #5



I honestly couldnt find the search box / menu item/ button whatever it is. Thanks for your guys answers though, I appreciate it. I understand now.

edit i should note that search has been located.

Post has been edited 1 time(s), last time on Jan 19 2009, 3:30 pm by alexpnd.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:14 pm]
Kyradax -- Hi
[05:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
[2024-5-22. : 6:10 am]
Riney -- Somethings never change.
[2024-5-22. : 6:10 am]
Riney -- I come back after 4 months. Post wob. Make a crappy post in Null. Hit a 0 in magic boxes.
[2024-5-22. : 6:00 am]
Riney -- :wob:
[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
Please log in to shout.


Members Online: NudeRaider