Connection Annimations not working
TheOddlySeagull opened this issue ยท 2 comments
This is what I was basing my variable off in the wiki:
https://github.com/DonBruce64/MinecraftTransportSimulator/wiki/Pack-Making-JSON-Animation-Variables#connection
I have tried multiple itterations in my Trin Tormador tow truck animation.
Unfortunately, it seems this variable system doesn't work.
My tow truck has 2 connection types: HOOKUP and TRAILER. HOOKUP is index 0 and TRAILER is 1.
The TRAILER connectiongroup has 2 connections: one for heavy duty (index 0), one for light vehicles (index 1).
I first tried with:
connection_1_connected, which should atart the animation when a vehicle is being towed by the tow truck, whether it's heavy duty or light vehicle. But nothing happens.
I then tried with connection_0_connected, which in theory should animate when the tow truck is being towed by something, but that didn't work either.
So, I tried connection_1_1_connected, which should of animated when the tow truck towed a light vehicle (only light vehicles, no heavy duty) but even that didn't work.
Here is my JSON related to connections and animations:
Animation:
{
"objectName": "$tow_t",
"animations": [
{
"animationType": "rotation",
"variable": "connection_1_1_connected",
"centerPoint": [
0.0,
0.5625,
-4.0625
],
"axis": [
-90.0,
0.0,
0.0
],
"duration": 160,
"forwardsStartSound": "iv_tpp:hydraulic_sound",
"reverseStartSound": "iv_tpp:hydraulic_sound"
},
{
"animationType": "rotation",
"variable": "damage_totaled",
"centerPoint": [
0.0,
0.5625,
-4.0625
],
"axis": [
-5.3167188487633465,
0.8621032607957808,
-2.899409689821537
]
}
]
}
Connection:
"connectionGroups": [
{
"groupName": "HOOKUP",
"isHookup": true,
"connections": [
{
"type": "tow_bumper_heavy",
"pos": [
0.0,
-0.3125,
8.1875
],
"distance": 2.0
},
{
"type": "tow_wheel_heavy",
"pos": [
0.0,
-0.625,
7.0625
],
"distance": 2.0
}
]
},
{
"groupName": "TRAILER",
"canInitiateConnections": true,
"isHitch": true,
"connections": [
{
"type": "tow_bumper_heavy",
"pos": [
0.0,
0.625,
-5.9375
],
"distance": 3.0
},
{
"type": "tow_bumper",
"pos": [
0.0,
0.625,
-5.9375
],
"distance": 2.0
}
]
}
],
trin_tormador_tq3.json
Here is the full JSON if ever.
@TheOddlySeagull You're using indexes wrong. There's no "0" connection. There's connection 1, 2, etc. You need to use index 2 for the hitch connection, 1 for the hookup. That being said, I'm tabling this until after release since it might be broken pre-CVs.