I think I see your issue. You are trying to do this all in the part and I think its too much for the model.
You need a gauge that is in the sim, outside of the model, that tells the part when to work.
You need a several-section Element gauge that manages the timer;
** Setup the timer, also called Reset, when the sim starts
** Starts the timer when the events trigger it
** Turns on the 'something' part
** Turns off the 'something' part if the events trigger loses one or more of its needed events
** Reset under certain conditions (timer goes back to zero).
Then, in the model 'Part Info' section, all you need is the 'visibility' function to have the proper L:var which is what your gauge will yell out to it when the events occur.
Sounds complicated, and if you dont know what it all is, then its like cold fusion equations.... (At least it is to me).
Here is a gauge code that Bill Leaming showed me which works my boot screen. I use it often for similar situations...
Code:
<!-- BOOT SCREEN -->
<!-- Initialize all variables when power is OFF -->
<Element>
<Select>
<Value>
(A:Avionics Master Switch,bool) 0 == (A:Electrical Master Battery,bool) 0 == || if{
0 (>L:3306BootScreen,enum)
0 (>L:3306BootTime,enum) }
</Value>
</Select>
</Element>
<!-- Start timer and increment when both battery and avionics are ON -->
<Element>
<Select>
<Value>
(A:Avionics Master Switch,bool) (A:Electrical Master Battery,bool) and (L:3306BootTime,enum) 320 <= and
if{ (L:3306BootTime,enum) ++ (>L:3306BootTime,enum) 1 (>L:3306BootScreen,enum) }
</Value>
</Select>
</Element>
<!-- Stop timer after 20 seconds -->
<Element>
<Select>
<Value>
(L:3306BootTime,enum) 320 > if{ 0 (>L:3306BootScreen,enum) }
</Value>
</Select>
</Element>
<!-- AAA While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Visible>(L:3306BootScreen,enum) 1 == </Visible>
<Position X="0" Y="0"/>
<Image Name="Hello.bmp" ImageSizes="1500,681" Bright="Yes">
</Image>
</Element>
<!-- CCC While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Visible>(L:3306BootTime,enum) 230 <</Visible>
<Position X="0" Y="0"/>
<Image Name="BootModelNumber.bmp" ImageSizes="1500,681" Bright="Yes">
</Image>
</Element>
<!-- CCC While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Select>
<Value>
(A:Avionics Master Switch,bool) (A:Electrical Master Battery,bool) and (L:3306BootTime,enum) 179 == and
if{ 1 (>L:XMLSND192,bool) }
</Value>
</Select>
</Element>
<!-- CCC While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Visible>(L:3306BootTime,enum) 165 <</Visible>
<Position X="0" Y="0"/>
<Image Name="BootCodeIntro.bmp" ImageSizes="1500,681" Bright="Yes">
</Image>
</Element>
<!-- BBB While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Visible>(L:3306BootTime,enum) 70 <</Visible>
<Position X="0" Y="0"/>
<Image Name="SyrosScreenOff.bmp" ImageSizes="1500,681" Bright="Yes">
</Image>
</Element>
Note that this code pack has screens that turn on and off during the timer 'run', and also a voice flag (sound file) also activates.
The very top part is 'Startup or Reset'.
The very bottom sections are commands that make the things happen.
Parts in the middle are management of the timer.
Just mull this over, check out how it works... The 320 is the timer amount that it goes to, its max count. That isnt seconds, and I forget the 'timer frequency count'. Someone will chime in on that. I just adjust it to be more or less, run it in the sim and when its right, I lock it in.
You could use a similar one, figure out the timing length, create a L:var string name, like 'L:mypartvisible,enum' (or bool) and Voila, you are good to go.
Do you know how to create the XML out of a Notebook file?