Kekelekou
Resource contributor
- Messages
- 226
- Country
Hello,
I am working on an animated firefighter signaling to the airtanker pilot the required actions at refill station (to be used along FireFighterX).
I had added the animation code to a XML gauge so that debugging was much easier. The codes is now working like a charm.
But I would like to directly inject the code into the MDL file, so that no panel/gauge fiddling is required from the end-user.
So I have just updated the anim code in the ModelDef to include the whole code as given below. But no joy ingame.
I have heard about XML format changes between gauges and ModelDef, could this be the cause of the animation failure ingame?
Any help appreciated.
Have a nice evening.
In the working "gauge" version, the modeldef featured only the last "100 (Leli_CurrentStatus, number) * (Leli_Timer, number) +" bit. All the rest was included in a panel gauge.
19/03/2019 Edit : The issue is related to the fact that this code is not run by the user aircraft's MDL, but by an AI ground vehicle.
I am working on an animated firefighter signaling to the airtanker pilot the required actions at refill station (to be used along FireFighterX).
I had added the animation code to a XML gauge so that debugging was much easier. The codes is now working like a charm.
But I would like to directly inject the code into the MDL file, so that no panel/gauge fiddling is required from the end-user.
So I have just updated the anim code in the ModelDef to include the whole code as given below. But no joy ingame.
I have heard about XML format changes between gauges and ModelDef, could this be the cause of the animation failure ingame?
Any help appreciated.
Have a nice evening.
Code:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo>
<Animation name="Peli_Guide_anim" guid="03351903-AF90-41fa-9406-8098038A0823" length="1000" type="Sim" typeParam2="Peli_Guide_anim" typeParam="AutoPlay" />
<PartInfo>
<Name>Peli_Guide_anim</Name>
<AnimLength>1000</AnimLength>
<Animation>
<Parameter>
<Code>
(L:RefillStation_Distance, number) 10 - 0 max (> L:Peli_DistToZone, number)
(L:Peli_CurrentStatus, enum) 0 !=
(L:Peli_CurrentStatus, enum) 0 ==
(L:RefillStation_Status, number) 1 == &&
||
if{
(L:Peli_Timer, number) 90 >=
if{
(L:Peli_CurrentStatus, enum) (L:RefillStation_Status, number) !=
if{
(L:Peli_Timer, enum) 99 ==
if{
(L:Peli_CurrentStatus, enum) 4 ==
(L:Peli_CurrentStatus, enum) 5 ==
||
(L:RefillStation_Status, number) 0 ==
&&
if{
9 (> L:Peli_CurrentStatus, enum)
0 (> L:Peli_LoopStart, number)
0 (> L:Peli_IsLoop, bool)
0 (> L:Peli_Timer, number)
}
(L:Peli_CurrentStatus, enum) 9 ==
(L:Peli_DistToZone, number) 150 >
(A:Sim On Ground, bool) ! ||
&&
if{
0 (> L:Peli_CurrentStatus, enum)
30 (> L:Peli_LoopStart, number)
1 (> L:Peli_IsLoop, bool)
1 (> L:Peli_Timer, number)
}
(L:RefillStation_Status, number) 1 ==
if{
1 (> L:Peli_CurrentStatus, enum)
80 (> L:Peli_LoopStart, number)
0 (> L:Peli_IsLoop, bool)
80 (> L:Peli_Timer, number)
}
(L:RefillStation_Status, number) 2 ==
(L:RefillStation_Status, number) 3 == ||
(L:RefillStation_Status, number) 4 == ||
(L:RefillStation_Status, number) 5 == ||
if{
(L:RefillStation_Status, number) (> L:Peli_CurrentStatus, enum)
70 (> L:Peli_LoopStart, number)
1 (> L:Peli_IsLoop, bool)
60 (> L:Peli_Timer, number)
}
(L:RefillStation_Status, number) 6 ==
(L:RefillStation_Status, number) 7 == ||
if{
(L:RefillStation_Status, number) (> L:Peli_CurrentStatus, enum)
0 (> L:Peli_LoopStart, number)
0 (> L:Peli_IsLoop, bool)
60 (> L:Peli_Timer, number)
}
(L:RefillStation_Status, number) 8 ==
if{
8 (> L:Peli_CurrentStatus, enum)
0 (> L:Peli_LoopStart, number)
0 (> L:Peli_IsLoop, bool)
90 (> L:Peli_Timer, number)
}
}
els{
(L:Peli_Timer, number) 1.0 + 99 min (> L:Peli_Timer, number)
}
}
els{
(L:Peli_IsLoop, bool)
if{
(L:Peli_LoopStart, number) (> L:Peli_Timer, number)
}
}
}
els{
(L:Peli_Timer, number) 1.0 + 90 min (> L:Peli_Timer, number)
}
}
els{
(L:Peli_DistToZone, number) 300 <
if{
(L:Peli_DistToZone, number) 15 <
if{
90
99 90 -
15 (L:Peli_DistToZone, number) - 0 max
15 /
*
+
(> L:Peli_Timer, number)
}
els{
(L:Peli_Timer, number) 90 >=
if{
30 (> L:Peli_Timer, number)
}
els{
(L:Peli_Timer, number) 1.0 + 90 min (> L:Peli_Timer, number)
}
}
}
els{
25 0 300 5 + (L:Peli_DistToZone, number) - max +
(> L:Peli_Timer, number)
}
}
100 (L:Peli_CurrentStatus, number) *
(L:Peli_Timer, number) +
</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
In the working "gauge" version, the modeldef featured only the last "100 (Leli_CurrentStatus, number) * (Leli_Timer, number) +" bit. All the rest was included in a panel gauge.
19/03/2019 Edit : The issue is related to the fact that this code is not run by the user aircraft's MDL, but by an AI ground vehicle.
Last edited: