How to: multiple frames + night anims

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Galliano.M
Settler
Reactions:
Posts: 1
Joined: 28 Feb 2022, 13:17

How to: multiple frames + night anims

#1

Post by Galliano.M »

If you want to learn how to make a plugin that contains different frames (like one or more rotations) with night animations
this is the right place!


Below I present you a JSON code that can contain all the frames of your plugin and associate the corresponding night animations to each.

Code: Select all    Reset

[ { "id": "$Night_Animation2022A", "type": "animation", "light": true, "light switching": true, "frames": [ { "bmp": "your_night_anim(01).png", "handle y": 30, "handle x": -6 } ] }, { "id": "$Night_Animation2022B", "type": "animation", "light": true, "light switching": true, "frames": [ { "bmp": "your_night_anim(02).png", "handle y": 30, "handle x": -6 } ] }, { "id": "$sample.plugin.unique.id.res00", "type": "residential", "author": "Lobby & theotheoderich", "width": 3, "height": 3, "draw ground": true, "animation": [ { "id": "$Night_Animation2022A", "x": 0, "y": 0, "frame": 0 }, { "id": "$Night_Animation2022B", "x": 0, "y": 0, "frame": 1 } ], "frames": [ { "bmp": "sample_bmp(01).png" }, { "bmp": "sample_bmp(02).png" } ], "level": 3 } ]
JSON checker
Check
Immagine 2022-07-11 213221edit.png
Here are written just two animations (the green and orange boxes) but the amount can be freely increased.

The "handle y" and "handle x" are not fixed values, so you will need to change them based on the circumstances, for example: the lights and windows may not coincide, with this numbers you will be able to change the coordinates at which the animations are placed on the axes.

In the "animation" sector (blue box) are contained the IDs of the animations and after "frame" is specified the frame which they are linked to: default=0 second=1 third=2 etc.

In the "frames" sector (yellow box) are stored the "base" frames of your plugin.


I hope this was helpful! ;)
*last update:15/07/22

Return to “Tutorials and Documentation”