Night Animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Marvel
Villager
Reactions:
Posts: 19
Joined: Sun Nov 29, 2020 8:47
Location: Indonesia
Plugins: Show

Re: Night Animations

#41

Post by Marvel »

How to make own animation
I am indonesia i like theotown and spaceflight simulator

SenyaBell
Bell
Reactions:
Posts: 862
Joined: Fri Oct 02, 2020 11:18
Location: Saratov
Plugins: Show
Version: Beta
Contact:

Platform

Re: Night Animations

#42

Post by SenyaBell »

Marvel wrote:
Thu Dec 03, 2020 11:20
How to make own animation
viewtopic.php?f=41&t=7455

User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 805
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Night Animations

#43

Post by Imran M »

What does "light switching" do?
I just love the DOPE-amine you get after completing a plugin!

User avatar
Kulche
Pluche
Reactions:
Posts: 1090
Joined: Wed Jun 07, 2017 20:28
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Night Animations

#44

Post by Kulche »

Imran M wrote:
Mon Jan 04, 2021 20:24
What does "light switching" do?
I wrote: ...which will make it appear at night only.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 805
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Night Animations

#45

Post by Imran M »

Kulche wrote:
Mon Jan 04, 2021 20:27
Imran M wrote:
Mon Jan 04, 2021 20:24
What does "light switching" do?
I wrote: ...which will make it appear at night only.
Thanks!
I just love the DOPE-amine you get after completing a plugin!

User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 805
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Night Animations

#46

Post by Imran M »

Kulche wrote:
Mon Jan 04, 2021 20:27
Imran M wrote:
Mon Jan 04, 2021 20:24
What does "light switching" do?
I wrote: ...which will make it appear at night only.
me.png
me.png (116.54 KiB) Viewed 1026 times
I just love the DOPE-amine you get after completing a plugin!

Lalulali
Settler
Reactions:
Posts: 2
Joined: Mon Dec 28, 2020 9:07

Re: Night Animations

#47

Post by Lalulali »

could some one help me, what is wrong with my way to define .json file

Code: Select all    Reset

[ { "id":"Lampu001", "type":"animation", "frames":[{"bmp": "Lampu 1.png"}], "light": true, "light switching": true }, { "id":"Lampu002", "type":"animation", "frames":[{"bmp": "Lampu 2.png"}], "light": true, "light switching": true }, { "id": "$HuResTp1", "type": "residential", "author": "lalulali", "width": 1, "height": 1, "frames": [{"bmp": "Human Res 1.png"}], "animation": {"id":"Lampu001", "x": 20, "y": -2}, {"id":"Lampu001", "x": 20, "y": -6}, {"id":"Lampu001", "x": 20, "y": -10}, {"id":"Lampu002", "x": 7, "y": -4} "level": 1, "people": 6, "title": "Human Residence", "text": "Human Residence Type 1 For Poor People", "price": 10, "bulldoze price": 15, "build time": 5 } ]
JSON checker
Check

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

Platform

Plugin Creator

Re: Night Animations

#48

Post by CommanderABab »

Code: Select all

[
    {
	"id":"Lampu001",
	"type":"animation",
	"frames":[{"bmp": "Lampu 1.png"}],
	"light": true,
	"light switching": true
    },
    {
	"id":"Lampu002",
	"type":"animation",
	"frames":[{"bmp": "Lampu 2.png"}],
	"light": true,
	"light switching": true
    },
    {
        "id": "$HuResTp1",
        "type": "residential",
        "author": "lalulali",
        "width": 1,
        "height": 1,
        "frames": [{"bmp": "Human Res 1.png"}],
	"animation":	[{"id":"Lampu001", "x": 20, "y": -2},
			{"id":"Lampu001", "x": 20, "y": -6},
			{"id":"Lampu001", "x": 20, "y": -10},
			{"id":"Lampu002", "x": 7, "y": -4}],
        "level": 1,
        "people": 6,
        "title": "Human Residence",
        "text": "Human Residence Type 1 For Poor People",
        "price": 10,
        "bulldoze price": 15,
        "build time": 5
    }
]

Code: Select all    Reset

[ { "id":"Lampu001", "type":"animation", "frames":[{"bmp": "Lampu 1.png"}], "light": true, "light switching": true }, { "id":"Lampu002", "type":"animation", "frames":[{"bmp": "Lampu 2.png"}], "light": true, "light switching": true }, { "id": "$HuResTp1", "type": "residential", "author": "lalulali", "width": 1, "height": 1, "frames": [{"bmp": "Human Res 1.png"}], "animation": [{"id":"Lampu001", "x": 20, "y": -2}, {"id":"Lampu001", "x": 20, "y": -6}, {"id":"Lampu001", "x": 20, "y": -10}, {"id":"Lampu002", "x": 7, "y": -4}], "level": 1, "people": 6, "title": "Human Residence", "text": "Human Residence Type 1 For Poor People", "price": 10, "bulldoze price": 15, "build time": 5 } ]
JSON checker
Check
You forgot [] around the "animation": ids in $HuResTp1.
...............:) .Image

Lalulali
Settler
Reactions:
Posts: 2
Joined: Mon Dec 28, 2020 9:07

Re: Night Animations

#49

Post by Lalulali »

finally, i can sleep now, for 2 days straight i think about it and now it solved, thanks

User avatar
ajimaul
Villager
Reactions:
Posts: 23
Joined: Wed Jan 27, 2021 15:28
Location: Indonesis
Plugins: Show

Plugin Creator

Platform

Re: Night Animations

#50

Post by ajimaul »

Lalulali wrote:
Sun Mar 07, 2021 14:40
finally, i can sleep now, for 2 days straight i think about it and now it solved, thanks
Hahahaha jangan kebanyakan ngopi biar bisa tidur bro :space
:android :calc :json newbie

User avatar
JohnSallow
Townsman
Reactions:
Posts: 63
Joined: Wed Jan 29, 2020 18:45
Location: Buenos Aires, Argentina
Plugins: Show
Version: Beta

Platform

Re: Night Animations

#51

Post by JohnSallow »

Can I make a rotation-awared building have a single animation array?
E.g.:

Code: Select all

[
{
"id":"$nightanim_test",
"type":"animation",
"frames":[{"bmp":"test.png","w":32,"count":4}],
"light":true,
"light switching":true
},
{
. . .
"rotation aware":true,
"animation":[{"id":"$nightanim_test"}],
. . .
}
]
As I'm hardly ever online on forum, I don't read any notifications from here by now, so if you wanna ask me permission of a plugin, or something, ask me on Discord: JohnSallow#5716 ;)

User avatar
Kulche
Pluche
Reactions:
Posts: 1090
Joined: Wed Jun 07, 2017 20:28
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Night Animations

#52

Post by Kulche »

Yes, that animation will be applied to all frames.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

User avatar
ajimaul
Villager
Reactions:
Posts: 23
Joined: Wed Jan 27, 2021 15:28
Location: Indonesis
Plugins: Show

Plugin Creator

Platform

Re: Night Animations

#53

Post by ajimaul »

please ... can you tell me what is the color code for transparency at night like this
Evaod_21-03-22_17.07.32.png
:android :calc :json newbie

User avatar
Kulche
Pluche
Reactions:
Posts: 1090
Joined: Wed Jun 07, 2017 20:28
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Night Animations

#54

Post by Kulche »

That's just a normal animation. It's a part of a building cut out.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

User avatar
ajimaul
Villager
Reactions:
Posts: 23
Joined: Wed Jan 27, 2021 15:28
Location: Indonesis
Plugins: Show

Plugin Creator

Platform

Re: Night Animations

#55

Post by ajimaul »

Kulche wrote:
Mon Mar 22, 2021 12:21
That's just a normal animation. It's a part of a building cut out.
ahh tanks for your info sir...
:android :calc :json newbie

User avatar
A dutch Guy
Inhabitant of a Megacity
Reactions:
Posts: 164
Joined: Tue Dec 26, 2017 14:41
Location: Enschede, The Netherlands
Plugins: Show

Platform

Plugin Creator

Re: Night Animations

#56

Post by A dutch Guy »

Is it possible to set night animations for each frame of a building? I wanted to add night animations to a building with a left and right facing variant with rotation awareness.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5406
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Night Animations

#57

Post by Bearbear76 »

A dutch Guy wrote:
Mon Apr 12, 2021 10:25
Is it possible to set night animations for each frame of a building? I wanted to add night animations to a building with a left and right facing variant with rotation awareness.
I'm not an expert but try adding this in the night animation.

Code: Select all

"frames":[x] // x is the frame number (starts from 0)
Just my opinion
I'm probably recompiling my kernel... :o

User avatar
Kulche
Pluche
Reactions:
Posts: 1090
Joined: Wed Jun 07, 2017 20:28
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Night Animations

#58

Post by Kulche »

Might work, but I would recommend adding eg. "frame": 0 in your animation objects. This way, the animation will be applied to first frame only.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

User avatar
Designer Anthony
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: Sat May 23, 2020 20:40
Location: California, USA
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Night Animations

#59

Post by Designer Anthony »

How am I supposed to save plugin space by animation? I don’t know how to do this. Tell me how. Thanks.

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

Platform

Plugin Creator

Re: Night Animations

#60

Post by CommanderABab »

You may study this plugin.

viewtopic.php?p=21614#p21614

It draws a base from one png, then multiple static floors with an elevator animation on each level from two other pngs, then a roof from a fourth png.
...............:) .Image

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”