Page 2 of 2

Re: Custom animations

Posted: 28 Jun 2020, 09:57
by TheFennekin
How do you make your animation appear only in night? (Night animations)

Re: Custom animations

Posted: 28 Jun 2020, 10:04
by CommanderABab
TheFennekin wrote:
28 Jun 2020, 09: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,

Re: Custom animations

Posted: 28 Jun 2020, 10:40
by TheFennekin
CommanderABab wrote:
28 Jun 2020, 10:04
TheFennekin wrote:
28 Jun 2020, 09: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 :)

Re: Custom animations

Posted: 08 Dec 2020, 03:30
by Marvel
Where to save the animation file

Re: Custom animations

Posted: 08 Dec 2020, 18:42
by CommanderABab
FranchuFranchu wrote:
17 Jun 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
}
]

Re: Custom animations

Posted: 10 Oct 2023, 08:03
by Pulga Wazaa
I have a question
I can create an animation that looks like the animation of the energy supply buildings?

Re: Custom animations

Posted: 17 Oct 2023, 19:29
by MeUsic
Can someone explain to me how to make an animation array? I have the model and night lights model ready, but I can't make them appear in game.

Re: Custom animations

Posted: 26 Feb 2024, 05:36
by burgernamn
is ticks = speed of the animation?

Re: Custom animations

Posted: 18 May 2024, 17:25
by Dzhiya
Does this animation reverse and repeatedly automatically? Or is there value?

Re: Custom animations

Posted: 23 May 2024, 10:18
by Mendel Group
How do we make night transition animation?