1.9.68 adds support for diagonal car drawing for roads that allow diagonals
See here for how to add night animation for your diagonal carJustAnyone wrote: ↑13 Jul 2021, 16:47Diagonal cars just use 8 instead of 4 frames.
4 for diagonal axis and 4 normally.
All you just need to do is specify "frames per variant": 8 attribute for the car drafts.
The following example is how diagonal firetrucks are implemented
In regard to the order of frames it works the same like before for the first 4 frames (which will have different order when v2 is set to true). The next four, diagonal frames are always ordered like this:Code: Select all
[{"id":"$carfirebrigade00","type":"car","frames":[{"x":512,"y":657,"w":32,"h":18,"count":4},{"x": 128,"y": 365,"w": 32,"h": 19,"count": 4,"offset y": 3072} // This array has 8 frames],"frames per variant": 8, // We let the game know that we use 8 frames per variant, otherwise it would treat 8 frames as 2 separate variants"animation":[{"id":"$animationcaralertlights00","pos":[16,-10, 10,-4, -4,-9, 4,-13],"important":true},{"id":"$animationcaralertlights00","pos":[18,-9, 12,-5, -2,-8, 6,-14],"important":true},{"id": "carlight_red","pos": [11, 4, 0, 0, 0, 0, 25, 1],"frames": [0, 3]},{"id": "carlight_red","pos": [13, 5, 0, 0, 0, 0, 27, 0],"frames": [0, 3]},{"id": "carlight_yellow","pos": [0, 0, 19, 5, 3, 0, 0, 0],"frames": [1, 2]},JSON checker within a quote