Date dependent animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3246
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Date dependent animations

Post by Lobby » Mon Aug 14, 2017 21:11

With version 332 you will be able to show an animation only on a specific date (range). For example, if we want to show an animation with id $animationblinkingredlight3x3 (this one is built-in into the game) only on 2nd, 3rd and 4th december. Then we might add this code to our building/road plugin:

Code: Select all

    "animation":[
      {
        "id":"$animationblinkingredlight3x3","x":15,"y":-1,
        "date":{
          "start day":2,
          "start month":12,
          "days":3
        }
      }
    ],
If you want the animation on multiple date ranges with gaps in between you may provide multiple animation spots, each for a single date range.
...Have a nice stay

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

Re: Date dependent animations

Post by CommanderABab » Mon Aug 14, 2017 21:27

Great! :teach :json animation :)

A suggestion :mine Maybe add one for day of the week only. :) To avoid coding a perpetual calendar in each plugin. :)
606606Currently using beta 606. 606 What's new? :)
Trains!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Brody Craft
Inhabitant of a Infinity
Reactions:
Posts: 7735
Joined: Tue Jan 24, 2017 11:15
Location: SE Asia
Plugins: Show
Version: Beta
Phone model: Samsung Galaxy Tab 3

Re: Date dependent animations

Post by Brody Craft » Tue Aug 15, 2017 10:59

Can you lock animation for the amout of time you set?
When you get to be called a Board Index because you are too good.>:3

User avatar
Lobby
Developer
Reactions:
Posts: 3246
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Re: Date dependent animations

Post by Lobby » Tue Aug 15, 2017 14:01

No, you cannot lock the animation, but you might do something similar by having to animations, a static and a non-static one. By switching between these two dependent on date you might create a similar effect.

You can also do it weekly or monthly by using repeat:

Code: Select all

    "animation":[
      {
        "id":"$animationblinkingredlight3x3","x":15,"y":-1,
        "date":{
          "start day":2,
          "days":3,
          "repeat":"weekly"
        }
      }
    ],
Valid arguments for repeat are yearly, monthly and weekly.

If you want to set an amount of days until it should repeat you can use days total:

Code: Select all

    "animation":[
      {
        "id":"$animationblinkingredlight3x3","x":15,"y":-1,
        "date":{
          "start day":1,
          "days":1,
          "days total":2
        }
      }
    ],
This example only shows the animation any second day.
...Have a nice stay

User avatar
JustAnyone
Junior Developer
Reactions:
Posts: 2483
Joined: Sun Jul 23, 2017 12:45
Location: Pickle command administration
Plugins: Show
Version: Beta
Phone model: Picklephone S5

Re: Date dependent animations

Post by JustAnyone » Wed Nov 01, 2017 9:31

Lobby wrote:
Tue Aug 15, 2017 14:01
No, you cannot lock the animation, but you might do something similar by having to animations, a static and a non-static one. By switching between these two dependent on date you might create a similar effect.

You can also do it weekly or monthly by using repeat:

Code: Select all

    "animation":[
      {
        "id":"$animationblinkingredlight3x3","x":15,"y":-1,
        "date":{
          "start day":2,
          "days":3,
          "repeat":"weekly"
        }
      }
    ],
Valid arguments for repeat are yearly, monthly and weekly.
Could I use the same code for notifications?

User avatar
Lobby
Developer
Reactions:
Posts: 3246
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Re: Date dependent animations

Post by Lobby » Wed Nov 01, 2017 13:11

@JustAnyone see this thread for date dependent fun :)
...Have a nice stay

User avatar
THEMAX
Inhabitant of a Supercluster
Reactions:
Posts: 3868
Joined: Thu Sep 14, 2017 17:30
Location: Astrellia, UHAE
Plugins: Show
Version: Beta

Re: Date dependent animations

Post by THEMAX » Wed Nov 01, 2017 20:11

We can make weekly firework!!!!
Emperor of Atlantean federated empire
Image
Founder state of Internationxal council
Leader of AEOY and steel pact

Imran M
Inhabitant of a Conurbation
Reactions:
Posts: 352
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Re: Date dependent animations

Post by Imran M » Sun Dec 02, 2018 15:26

So, I could make a rocket fly up on December 1st, and I could make it come back on the 31st of December? I'm making a new plugin. But, I need to make two animations, one for leaving, and one for landing, and I'm thinking of using the other type of animation, like move x
Secretary of Foreign Affairs of Adnijan.
I can do json files for people if they want me to (no fun).
My avatar is very original.

Imran M
Inhabitant of a Conurbation
Reactions:
Posts: 352
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Re: Date dependent animations

Post by Imran M » Mon Dec 03, 2018 23:22

Oh, I dumb. I just realized it. Thanks!
Secretary of Foreign Affairs of Adnijan.
I can do json files for people if they want me to (no fun).
My avatar is very original.

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: Wekabu city and 1 guest