- Messages
- 98
Yep. It sounds too quiet and not full length. When I remove the TOGGLE it's perfect.Corrupted?
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.
Yep. It sounds too quiet and not full length. When I remove the TOGGLE it's perfect.Corrupted?
That's what I did. It appears TOGGLE somehow interrupts with the sound. Gotta place it in clickspot areas instead.Test both cases, where you remove TOGGLE and then with it. If the problem persist, I've got no idea what is causing it
<Element>
<Position>
<Select>
<Value>(L:BUTTON,bool)</Value>
<Case Value="0">
<Image Name="Released.bmp">
</Case>
<Case Value="1">
<Image Name="Pushed.bmp">
</Case>
</Select>
</Element>
<Mouse>
<Area>
<Tooltip>BUTTON</Tooltip>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+LeftRelease+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
1 (>L:BUTTON,bool)
1 (>L:PushedSound,number)
}
(M:Event) 'LeftRelease' scmp 0 ==
if{
0 (>L:BUTTON,bool)
1 (>L:ReleasedSound,number)
}
(M:Event) 'Leave' scmp 0 ==
if{
0 (>L:BUTTON,bool)
1 (>L:ReleasedSound,number)
}
</Click>
</Area>
</Mouse>
<Area Left="0" Top="0" Right="29" Bottom="29">
<Tooltip ID=""> AP Off </Tooltip>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle+Leave" Repeat="Yes">
(M:Event)
'LeftSingle' scmp 0 ==
(L:AP_Disc_BT,number) 0 ==
&&
if{
1 (>L:AP_Disc_BT,number)
1 (>L:DSD_TECH_Button_SD,number)
}
(M:Event)
'Leave' scmp 0 ==
if{
2 (>L:AP_Disc_BT,number)
}
</Click>
</Area>
</Mouse>
+++give this in an element ++++++++++++++++++++++++++++
<!-- Reset Button sound -->
(L:AP_Disc_BT,number) 2 ==
if{
(L:DSD_TECH_Button_SD,number) 0 ==
if{
0 (>L:AP_Disc_BT,number)
1 (>L:DSD_TECH_Button_SD,number)
}
}
Thanks! No loop anymore.the second is easy.
<Area> <Tooltip></Tooltip> <Cursor Type="UpArrow"/> <Click Kind="LeftSingle" Repeat="No" MouseWheelFlip="No"> (M:Event) 'LeftSingle' scmp 0 == if{ (L:KNOB,number) ++ 5 min (>L:TRMODE,number) <!-- Knob Switch Sound --> 1 (>L:KNOBSOUND,number) } </Click> </Area> <Area> <Tooltip></Tooltip> <Cursor Type="DownArrow"/> <Click Kind="LeftSingle" Repeat="No" MouseWheelFlip="No"> (M:Event) 'LeftSingle' scmp 0 == if{ (L:KNOB,number) -- 0 max (>L:TRMODE,number) <!-- Knob Switch Sound --> 1 (>L:KNOBSOUND,number) } </Click> </Area>
<Element> <Select> <Value> (L:KNOB,number) 4 == (L:SWITCH3,bool) ! && (A:CIRCUIT AVIONICS ON,bool) && (L:SWITCH1,bool) && if{ (>K:RADIO_VOR1_IDENT_ENABLE) } els{ (>K:RADIO_VOR1_IDENT_DISABLE) } (L:KNOB,number) 4 == (L:SWITCH3,bool) ! && (A:CIRCUIT AVIONICS ON,bool) && (L:SWITCH1,bool) ! && if{ (>K:KEY_RADIO_ADF_IDENT_ENABLE) } els{ (>K:KEY_RADIO_ADF_IDENT_DISABLE) } (L:KNOB,number) 5 == (L:SWITCH3,bool) ! && (A:CIRCUIT AVIONICS ON,bool) && (L:SWITCH2,bool) && if{ (>K:RADIO_VOR2_IDENT_ENABLE) } els{ (>K:RADIO_VOR2_IDENT_DISABLE) } (L:KNOB,number) 5 == (L:SWITCH3,bool) ! && (A:CIRCUIT AVIONICS ON,bool) && (L:SWITCH2,bool) ! && if{ (>K:KEY_RADIO_ADF2_IDENT_ENABLE) } els{ (>K:KEY_RADIO_ADF2_IDENT_DISABLE) } </Value> </Select> </Element>
Yes, the "KEY" to understanding is that the KEY_ prefix is only used in C/C++ code...That's it.
Yes, the "KEY" to understanding is that the KEY_ prefix is only used in C/C++ code...
Tom thanks! Got an error when loading it. But I asked a guy that have access to the model source and he gave it to me.Load the MDL into ModelConverterX.
A B C || &&
A B C || D || E || &&
Adding (L:BUTTON,bool) 0 == works perfectly for a simple push & release button, no loop, but what if it is STAB TRIM like this one:the second is easy.
<Mouse>
<Area>
<Tooltip>STAB TRIM</Tooltip>
<Cursor Type="UpArrow"/>
<Click Kind="LeftSingle+LeftRelease+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
-1 (>L:BUTTON,bool) (L:Stabilizer, degree) 0 <
1 (>L:PushedSound,number)
if{
(L:Stabilizer, degree) 0.05 + (>L:Stabilizer, degree)
}
}
(M:Event) 'LeftRelease' scmp 0 ==
if{
0 (>L:BUTTON,bool)
1 (>L:ReleasedSound,number)
}
(M:Event) 'Leave' scmp 0 ==
if{
0 (>L:BUTTON,bool)
1 (>L:ReleasedSound,number)
}
</Click>
</Area>
</Mouse>
(L:Stabilizer, degree) (L:Stabilizer_Old, degree) !=
if{ 1 (">>L:PushedSound,number)
(L:Stabilizer, degree) 0.05 + (">>L:Stabilizer, degree)
(L:Stabilizer, degree) (>L:Stabilizer_Old, degree)
}
Thanks! Actually it's a 3 position switch and sorry I mistakenly put (L:BUTTON,bool) instead of (G:Var1) winch is linked to 3 bitmaps - up, center, & down with values -1, 0, & 1. The STAB range is 0 to -2.5 degrees so the second part of the code is:you need to compare the current stabilizer trim value with its last value in a slightly differently named variable
<Area>
<Tooltip>STAB TRIM</Tooltip>
<Cursor Type="DownArrow"/>
<Click Kind="LeftSingle+LeftRelease+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
1 (>G:Var1) (L:Stabilizer, degree) -2.5 >
1 (>L:PushedSound,number)
if{
(L:Stabilizer, degree) 0.05 - (>L:Stabilizer, degree)
}
}
(M:Event) 'LeftRelease' scmp 0 ==
if{
0 (>G:Var1)
1 (>L:ReleasedSound,number)
}
(M:Event) 'Leave' scmp 0 ==
if{
0 (>G:Var1)
1 (>L:ReleasedSound,number)
}
</Click>
</Area>