Conditional display (ASM tweak)

From FSDeveloper Wiki
Revision as of 05:15, 26 January 2008 by Arno (talk | contribs)
Jump to navigationJump to search

With MakeMDL it is not possible to specify conditions for the display of your objects (or parts of them). But how about the lights that should only be shown at night or the Christmas tree that should be displayed only in December?

With a relatively simple modification to the source code it is possible to display the object only when you want it. The structure of the code is as follows:

IFIN1 labelname, var, con1, con2
; the code you want only to display in the certain condition
labelname label word

So you must first find the code of the object(s) you want to apply the condition to. After that you place the IFIN1 command in front of it. This command has four parameters. The first one is the label that is jumped to if the condition is not met. This is the label you need to place behind the object you want to apply the condition to. All names of labels must be unique, so if you add conditions to different objects in one source, make sure you give all the labels a different name. The next parameter is the variable you want to check for. The next two parameters are the minimum and the maximum value the variable can have to fullfill the condition. If you for example want something to display at dusk/dawn and night then the commands looks like:

IFIN1 labelname, tod, 2, 4