Date dependent animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Platform

Date dependent animations

#1

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: 7933
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Date dependent animations

#2

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. :)
777!777Currently using alpha 777. 777 What's new? :)
online maps!!
:)

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

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

Platform

Re: Date dependent animations

#3

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: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Date dependent animations

#4

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
An important pickle
Reactions:
Posts: 2701
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show
Phone model: Nokia 3310

Plugin Creator

Platform

Re: Date dependent animations

#5

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: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Date dependent animations

#6

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 Universe
Reactions:
Posts: 4216
Joined: Thu Sep 14, 2017 17:30
Location: Astrellia, UHAE
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Date dependent animations

#7

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: 530
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Platform

Plugin Creator

Re: Date dependent animations

#8

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
https://m.youtube.com/watch?v=AqpYHdv3S00 gives 404 error.

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

Platform

Plugin Creator

Re: Date dependent animations

#9

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

Oh, I dumb. I just realized it. Thanks!
https://m.youtube.com/watch?v=AqpYHdv3S00 gives 404 error.

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”