Custom animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2217
Joined: Thu Aug 24, 2017 11:17
Location: Tokyo
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Custom animations

#21

Post by TheFennekin »

How do you make your animation appear only in night? (Night animations)
チャーハンが美味しい 🍚🍚🍚

Check out viewtopic.php?f=45&t=12770&p=169257#p169257

User avatar
CommanderABab
AB
Reactions:
Posts: 9125
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Custom animations

#22

Post by CommanderABab »

TheFennekin wrote:
Sun Jun 28, 2020 9:57
How do you make your animation appear only in night? (Night animations)
Have these two lines in youe animation:

Code: Select all

      "light switching":true,
      "light":true,
Image

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2217
Joined: Thu Aug 24, 2017 11:17
Location: Tokyo
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Custom animations

#23

Post by TheFennekin »

CommanderABab wrote:
Sun Jun 28, 2020 10:04
TheFennekin wrote:
Sun Jun 28, 2020 9:57
How do you make your animation appear only in night? (Night animations)
Have these two lines in youe animation:

Code: Select all

      "light switching":true,
      "light":true,
Can I have an example json of a custom animation that will only appear at night? I want something to base on :)
チャーハンが美味しい 🍚🍚🍚

Check out viewtopic.php?f=45&t=12770&p=169257#p169257

User avatar
Marvel
Villager
Reactions:
Posts: 19
Joined: Sun Nov 29, 2020 8:47
Location: Indonesia
Plugins: Show

Re: Custom animations

#24

Post by Marvel »

Where to save the animation file
I am indonesia i like theotown and spaceflight simulator

User avatar
CommanderABab
AB
Reactions:
Posts: 9125
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Custom animations

#25

Post by CommanderABab »

FranchuFranchu wrote:
Sun Jun 17, 2018 22:22
Since KoalaGuy was deleted, all his posts are gone. One of those posts was about custom animations. So here I am remaking the tutorial

To define your animation:

Code: Select all

[
   {
       "id":"myanimation",
       "frames":[ {
              "bmp":"myanim.png"
              "move x":5 //In moment number 1, 
             //our animation will be in x 5
             "move y":16 //and in y 16
           },{
              "bmp":"myanim.png"
              "move x":10 //In moment number 2, 
             //our animation will be in x 10
             "move y":16 //and in y 16
           }
           
         ]
         "handle interpolation":5 //5 ticks between
         //moment 1 and moment 2
     }
]
To use it:

Code: Select all

[ 
  {
    "id":"buildingwithanimation",
    "type":"decoration",
    "width":1,
    "height":1,
    "frames":[{"bmp":"basepart.png"}],
    "animation":[
      {"id":"myanimation"}
    ]
  }
 ]
I hope I didn't mess up with anything
You would normally put the animation in the same json file as the plugin. Like so:

Code: Select all

[
{Example 1 in quote
},
{Example 2 in quote
}
]
Image

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”