- Messages
- 106
- Country

hi,
how can i make a blinking image for 5 times in a xml gauge?
how can i make a blinking image for 5 times in a xml gauge?
Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.




<Element>
<Visible>(P:Absolute time,seconds) 2 % 1 1 * > ! // no funktion --> and (L:ibf_test_r,bool) 5 == </Visible>
<Position X="434" Y="52"/>
<Select>
<Value>(L:ibf_test_r,bool) 1 == if{ (A:Avionics master switch, bool) (A:Electrical master battery, bool) 1 == && }</Value>
<Case Value="1">
<Image Name="balken_test.bmp"/>
</Case>
</Select>
</Element>

<Element>
<Visible>(P:Absolute time,seconds) 2 % 1 1 * (L:Blink_Counter, enum) 5 <= && </Visible>
<Position X="434" Y="52"/>
<Select>
<Value>(L:ibf_test_r,bool) 1 == if{ (A:Avionics master switch, bool) (A:Electrical master battery, bool) 1 == && }</Value>
<Case Value="1">
<Image Name="balken_test.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Select>
<Value>(P:Absolute time,seconds) 2 % 1 1 * 1 == (L:Blink_Test, bool) ! && if{ (L:Blink_Counter, enum) ++ (>L:Blink_Counter, enum) (L:Blink_Test, bool) ! (>L:Blink_Test,bool) } els{ (P:Absolute time,seconds) 2 % 1 1 * 0 == (L:Blink_Test, bool) && if{ (L:Blink_Test, bool) ! (>L:Blink_Test,bool) } } </Value>
</Select>
</Element>

hmm, is blinking when i load the helicopter
an attempt was worth it.
[I]trigger_condition[/I] if{ 5 (>L:Blink_Counter, enum) [I]remove_trigger_condition[/I] }
<Visible>(P:Absolute time,seconds) 2 % 0.5 2 * > ! (L:Blink_Counter, enum) 0 > and s0 (L:Blink_Counter, enum) l0 - (>L:Blink_Counter, enum)</Visible>
<Position X="434" Y="52"/>
<Select>
<Value>(L:ibf_test_r,bool) 1 == if{ (A:Avionics master switch, bool) (A:Electrical master battery, bool) 1 == && }</Value>
<Case Value="1">
<Image Name="balken_test.bmp"/>
</Case>
</Select>
</Element>

How about this:
Code:<Visible> current_time begin_blink_time - sp0 l0 > num_blinks blink_period * l0 blink_period / 2 * flr 2 % 1 < || </Visible>

A quick analysis:
current_time begin_blink_time - sp0 = empty stack
l0 > = you are comparing to an empty stack, is this ok to your intentions?
Suppose you intended s0 instead, then,
s0 l0 > is always false (0)
Tom
sp0 should store the value on top of the stack in variable 0 and then pop it off the stack.
l0 should place the value in variable 0 on top of the stack.
current_time begin_blink_time -
blink_period
num_blinks

[COLOR="Red"]current_time[/COLOR] [COLOR="Red"]begin_blink_time[/COLOR] - sp0
l0 [COLOR="Red"]num_blinks blink_period[/COLOR] * >
l0 [COLOR="Red"]blink_period[/COLOR] / 2 * flr 2 % 1 <
||