Difference between revisions of "Selective GRF Loading"
From TTWiki
Jump to navigationJump to search (Reformat and update) |
m (add nav template) |
||
Line 1: | Line 1: | ||
+ | {{NFOTutorial}} |
||
+ | |||
Certain grf files should only be loaded in some climates, only if certain switches are on, or some other circumstances. |
Certain grf files should only be loaded in some climates, only if certain switches are on, or some other circumstances. |
||
Revision as of 21:01, 28 August 2011
Certain grf files should only be loaded in some climates, only if certain switches are on, or some other circumstances.
To do this, the first entries in your .grf file must be action 7s which test that condition, and skip the rest of the file if true. To skip the rest of the file, remember to specify a <num-sprites> parameter of 00.
Immediately *after* your initial action 7 entries, you place the action 8 that defines your GRF ID.
This way, the .grf file is considered active or inactive in the right circumstances.