Vitus
Resource contributor
- Messages
- 1,480
- Country

Hi all,
I need to create some warning lights for my VC. The lights are modeled in 3D (as everything else) and I was wondering how to program the different states in the modeldef.xml file.
I made two warning light parts, one is textured with a light-off texture, the other with a light-on texture. I thought about this problem and my solution was the following code:
As you can see, I coded one entry for each light-state. It works quite well but I was wondering if there is an easier way of doing it.
Regards
Vitus
I need to create some warning lights for my VC. The lights are modeled in 3D (as everything else) and I was wondering how to program the different states in the modeldef.xml file.
I made two warning light parts, one is textured with a light-off texture, the other with a light-on texture. I thought about this problem and my solution was the following code:
Code:
//light_gear_left_red_on
<PartInfo>
<Name>light_gear_left_red_on</Name>
<Visibility>
<Parameter>
<Code>
(L:ELEC BUS GEAR MOTOR, enum) 0 >
(A:GEAR POSITION:2,enum) 1 >
and
if{ 1 }
els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
//light_gear_left_red_off
<PartInfo>
<Name>light_gear_left_red_off</Name>
<Visibility>
<Parameter>
<Code>
(L:ELEC BUS GEAR MOTOR, enum) 0 >
(A:GEAR POSITION:2,enum) 1 >
and
if{ 0 }
els{ 1 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
As you can see, I coded one entry for each light-state. It works quite well but I was wondering if there is an easier way of doing it.
Regards
Vitus



