Date dependent animations

Learn here how to create and use plugins.

Moderator: KoalaGuy

Post Reply
User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: 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 Universe
Reactions:
Posts: 4751
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. :)
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Brody Craft
Inhabitant of a Multiverse
Reactions:
Posts: 5355
Joined: Tue Jan 24, 2017 11:15
Location: 69 Leetza St, Berevesk
Plugins: Show
Version: Beta
Phone: 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?
"5000 Posts!"
President Of R.O.V.
CEO Of LobbyNet
11 Month Anniversary!
I play ROBLOX

User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: 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
Inhabitant of a Planet
Reactions:
Posts: 1429
Joined: Sun Jul 23, 2017 12:45
Location: Space Station 478B
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

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?
President of Domkisas
Founder and owner of DSA
Official TheoTown discord manager
I will reply if someone says ANYONE
Developer of Plugin Creator.

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: Date dependent animations

Post by KoalaGuy » Wed Nov 01, 2017 9:33

JustAnyone wrote:
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?
No, for that you need fun, not animations
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: 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 Continent
Reactions:
Posts: 1205
Joined: Thu Sep 14, 2017 17:30
Location: Paris, France
Plugins: Show
Version: Beta
Phone: STQAE imperial phone

Re: Date dependent animations

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

We can make weekly firework!!!!
Emperor of STQAE.
Image
"vive l'empereur et vive l'empire"
have a Nice day
leader of the space, aeronautic, military research , education and Health care

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: Date dependent animations

Post by KoalaGuy » Wed Nov 01, 2017 20:31

THEMAX wrote:
Wed Nov 01, 2017 20:11
We can make weekly firework!!!!
Yeah, since 3 months ago :lol:
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

Post Reply

Who is online

Users browsing this forum: Kulche and 1 guest