Date dependent animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3127
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
Inhabitant of a Multiverse
Reactions:
Posts: 6364
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. :)
517517Currently using beta 517. 517 What's new? :)
Lua!
:)

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

User avatar
Brody Craft
Inhabitant of a Multiverse
Reactions:
Posts: 6611
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?
Do you want guns?
[youtube]https://youtube.com/watch?v=nk7Cj209GQg[/youtube]
28.49%

User avatar
Lobby
Developer
Reactions:
Posts: 3127
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
Feature manager
Reactions:
Posts: 2293
Joined: Sun Jul 23, 2017 12:45
Location: Pickle Jar
Plugins: Show
Version: Beta
Phone model: Picklephone XP 5

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: 3127
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 Galaxy Cluster
Reactions:
Posts: 2949
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 United Nations
Leader of OISP

#FightLikeAizat
#PrayForAizat

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest