Hi , everyone. I pretty much finished the car that I was working on, with the tire animations and the glass. However, I am trying to get the wipers to work. I started experimenting by another code from another thread on here. However, I am trying to get the wipers to work. I started experimenting by using another code from another thread on here . The issue is when I press the switch, the mouse cursor changes to the hand but the wipers do not turn on in fsx. I included the code in both my xanim file to add i to the animation itself andafterwards, my modeldef.xml file to attempt to add the "Wiper_switch" and "Wiper_Anim" tag to see if both tags appear in my animation manager, and it does not. The only way the wipers move, is if i use the switch anti ice tag in the mouse rect attach tool and the animation tool for the wipers , but it only moves the wipers up if i press the "H" keyboard button once for up and once for down. Wiper_Switch only appears in the mouse rect tool , but wiper anim is no where to be seen. How can I make the wipers work? and here is the thread I am referencing. I attached the mdl, xanim and modeldef.xml files :
fsdeveloper.com/forum/threads/windshield-wiper-animation-tag.417509/
here are the objects (76 and 80) that I am trying to work on so that it activates when i press object named as "wiper_switch" in fsx.
code for switch:
<Animation name="Wiper_Switch" guid="C09CD82E-77CC-4082-926D-5F040D645B89" length="100" type="Sim" typeParam2="Wiper_Switch" typeParam="AutoPlay" />
<PartInfo>
<Name>Wiper_Switch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(L:WIPER SWITCH,number)</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Wiper Switch %((L:WIPER SWITCH,number))%{case}%{:0}Off%{:50}Slow%{:100}Fast%{end}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease+LeftDrag+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (M:X) (>L:MOUSEPOS,number) quit }
(M:Event) 'LeftDrag' scmp 0 ==
if{ (M:X) (L:MOUSEPOS,number) - 0.2 * (L:WIPER SWITCH,number) + 0 max 100 min (>L:WIPER SWITCH,number) (M:X) (>L:MOUSEPOS,number) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ (L:WIPER SWITCH,number) 25 <
if{ 0 (>L:WIPER SWITCH,number) }
25 75 (L:WIPER SWITCH,number) rng
if{ 50 (>L:WIPER SWITCH,number) }
(L:WIPER SWITCH,number) 75 >
if{ 100 (>L:WIPER SWITCH,number) }
}
(M:Event) 'WheelUp' scmp 0 ==
if{ (L:WIPER SWITCH,number) 50 + 100 min (>L:WIPER SWITCH,number) }
(M:Event) 'WheelDown' scmp 0 ==
if{ (L:WIPER SWITCH,number) 50 - 0 max (>L:WIPER SWITCH,number) }
(L:WIPER SWITCH,number) 25 <
if{ 0 (>L:WIPER STATE,number) }
25 75 (L:WIPER SWITCH,number) rng
if{ 1 (>L:WIPER STATE,number)
0.85 (>L:WIPER SPEED,number) }
(L:WIPER SWITCH, number) 75 >
if{ 1 (>L:WIPER STATE,number)
2 (>L:WIPER SPEED,number) }
</CallbackCode>
</MouseRect>
</PartInfo>
code for wipers:
<Animation name="Wiper_Anim" guid="E8CF768B-39AE-44f2-9F89-6F7F30DCD5AD" length="100" type="Sim" typeParam2="Wiper_Anim" typeParam="AutoPlay" />
<PartInfo>
<Name>Wiper_Anim</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:ELECTRICAL MASTER BATTERY,bool) 0 !=
if{ (L:WIPER STATE,number) 0 != (L:WIPER POS,number) 1 > or
if{ (L:WIPER POS,number) (L:WIPER SPEED,number) 0.75 * + 100 % d (>L:WIPER POS,number) } }
els{ (L:WIPER POS,number) }
</Code>
</Parameter>
</Animation>
</PartInfo>
fsdeveloper.com/forum/threads/windshield-wiper-animation-tag.417509/
here are the objects (76 and 80) that I am trying to work on so that it activates when i press object named as "wiper_switch" in fsx.
code for switch:
<Animation name="Wiper_Switch" guid="C09CD82E-77CC-4082-926D-5F040D645B89" length="100" type="Sim" typeParam2="Wiper_Switch" typeParam="AutoPlay" />
<PartInfo>
<Name>Wiper_Switch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(L:WIPER SWITCH,number)</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Wiper Switch %((L:WIPER SWITCH,number))%{case}%{:0}Off%{:50}Slow%{:100}Fast%{end}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease+LeftDrag+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (M:X) (>L:MOUSEPOS,number) quit }
(M:Event) 'LeftDrag' scmp 0 ==
if{ (M:X) (L:MOUSEPOS,number) - 0.2 * (L:WIPER SWITCH,number) + 0 max 100 min (>L:WIPER SWITCH,number) (M:X) (>L:MOUSEPOS,number) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ (L:WIPER SWITCH,number) 25 <
if{ 0 (>L:WIPER SWITCH,number) }
25 75 (L:WIPER SWITCH,number) rng
if{ 50 (>L:WIPER SWITCH,number) }
(L:WIPER SWITCH,number) 75 >
if{ 100 (>L:WIPER SWITCH,number) }
}
(M:Event) 'WheelUp' scmp 0 ==
if{ (L:WIPER SWITCH,number) 50 + 100 min (>L:WIPER SWITCH,number) }
(M:Event) 'WheelDown' scmp 0 ==
if{ (L:WIPER SWITCH,number) 50 - 0 max (>L:WIPER SWITCH,number) }
(L:WIPER SWITCH,number) 25 <
if{ 0 (>L:WIPER STATE,number) }
25 75 (L:WIPER SWITCH,number) rng
if{ 1 (>L:WIPER STATE,number)
0.85 (>L:WIPER SPEED,number) }
(L:WIPER SWITCH, number) 75 >
if{ 1 (>L:WIPER STATE,number)
2 (>L:WIPER SPEED,number) }
</CallbackCode>
</MouseRect>
</PartInfo>
code for wipers:
<Animation name="Wiper_Anim" guid="E8CF768B-39AE-44f2-9F89-6F7F30DCD5AD" length="100" type="Sim" typeParam2="Wiper_Anim" typeParam="AutoPlay" />
<PartInfo>
<Name>Wiper_Anim</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:ELECTRICAL MASTER BATTERY,bool) 0 !=
if{ (L:WIPER STATE,number) 0 != (L:WIPER POS,number) 1 > or
if{ (L:WIPER POS,number) (L:WIPER SPEED,number) 0.75 * + 100 % d (>L:WIPER POS,number) } }
els{ (L:WIPER POS,number) }
</Code>
</Parameter>
</Animation>
</PartInfo>