Announcement

Collapse
No announcement yet.

Question about slic events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about slic events

    if a certain event is tied into different slic files, what will happen? are all of these executed, or only as many until the slic reaches the STOP command, in what order are these executed?

    in this case i'm talking about the cutimprovements event, which is tied to the cityexpansioncode, the visible wonders code and presumingly to some others as well.

    thanks, zaph

  • #2
    To be honest I can pnly guess, well a way to find it out would be to put certain message boxes in each of the event handlers and see when the messages pop up. Here is my threory: You have a bunch of event handlers all triggerd by the same event and are executed post (all could be pre as well) the handler that appears in the code first is executed first. That is for event handlers in the same script now what is if they are in different scripts. You know that all the scripts a are included in certain order in the script.slc. I think that the compiler reads the code in the slic file then if there is a include directive the code in the included file and then the following code in the slic file. At least I know that functions have to be declared before you want to use them in slic. So if you now include a function in another script file before your actual script file were you use it then it is ok. But if you change the order of the two files then the game can't find the function.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

    Comment

    Working...
    X