Mit diesem script lassen sich in der xml definierte <animation>'s per Tastendruck abspielen.
Beispiel-Mod: Einzelaushub
Einbau
modDesc:
Code: modDesc.xml
<specializations>
<specialization name="toggleAnimation" className="toggleAnimation" filename="data/toggleAnimation.lua"/>
</specializations>
<vehicleTypes>
<type name="YOUR VEHICLE TYPE" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua" parent="CHECK WHAT'S SUITABLE FOR YOUR MOD">
<specialization name="toggleAnimation" />
</type>
</vehicleTypes>
<actions>
<action name="TA_amim1" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim2" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim3" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim4" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim5" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim6" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim7" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim8" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim9" category="VEHICLE" axisType="HALF"/>
<action name="TA_amim110" category="VEHICLE" axisType="HALF"/>
</actions>
<!-- here you change the button to use -->
<inputBinding>
<actionBinding action="TA_amim1">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_t" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim2">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_y" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim3">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_g" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim4">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_h" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim5">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_a" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim6">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_b" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim7">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_c" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim8">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_d" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim9">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_e" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
<actionBinding action="TA_amim110">
<binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_f" axisComponent="+" neutralInput="0" index="1"/>
</actionBinding>
</inputBinding>
<l10n>
<text name="input_TA_amim1">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim2">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim3">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim4">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim5">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim6">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim7">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim8">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim9">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
<text name="input_TA_amim110">
<en>Description of action</en>
<de>Beschreibung der Aktion</de>
</text>
</l10n>
Alles anzeigen
XML:
Code: xml
<toggleAnimation anim1="name of your animation1" anim2="name of your animation2" anim3="name of your animation3" anim4="name of your animation4" anim5="name of your animation5" anim6="name of your animation6" anim7="name of your animation7" anim8="name of your animation8" anim9="name of your animation9" anim10="name of your animation10"/>
Es müssen nicht alle TA_anim und anim Einträge genutzt werden.
Braucht man z.B. nur 2 Animationen, löscht man die TA_anim3-10 bzw anim3-10 einfach raus.
Alle Attribut-Namen sollten unverändert bleiben.
Es brauchen nur die Namen der <animation> in der xml bei "anim1"-"anim10" eingetragen werden bzw. in der Moddesc die individuellen Texte für de/en.
-
Version 1.0.0.0
-
da-hoffi -
18. Juli 2021 um 22:10 -
2,69 kB -
1,4k Downloads
-
HoFFi
Autor