Light animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Platform

Plugin Creator

Light animations

#1

Post by CommanderABab » Mon Aug 12, 2019 5:59

To include light within your plugins:

Use

Code: Select all

"light":true
within an animation and use that animation as the plugin image. Note the frames is left null in the plugin itself and draw ground is used.

Code: Select all

[{  
	  "id":"$testlightanim",
	  "type":"animation",
	  "light":true,
	  "light switching":false,
	  "frames": [{"bmp":"unsettlingi.png","handle y":8}]
	},
	"id":"$testxlight",
	   "title": "test",
		"text": "test",
		"build time": 3,
		"price": 0,
		"removable": true,
		"needs road": false,
		"needs land":false,
		
		"draw ground": true,
		"max count":96,
		"type": "park",
		"frames":[],
		"animation":[{"id":"$testlightanim"}],
		"slope aware":true,
		"influence park":10,
		"width": 1,
		"height": 1,
		"fun":[
        
        {"condition":{"type":"and","inner":[{"type":"buildable","id":"$testxlight","x":-1,"y":-1}, {"type":"days built","min":3,"max":4},{"type":"building count","id":"$testxlight","min":0,"max":50},{"type":"rect","x":-6,"y":-6,"w":13,"h":13,"min":1,"max":169,"inner":[{"type":"road","level":0}]}]},
"actions":[{"type":"build","id":"$testxlight","x":-1,"y":-1}],"p":100, "ignore sucess":true }]
]
unsettlingi.png
unsettlingi.png (290 Bytes) Viewed 1129 times
Use:

Code: Select all

"light":true,
	  "light switching":true
or omit the light switching line because the default is true if light is used.
If light switching is true, the park will only be visible at night with the day night cycle plugin from the plugin store built on the map. With both lines omitted, the park would always be visible, but darken at night.
The code should work if you include the image in the test folder within your plugins folder.
770!770Currently using alpha 770. 770 What's new? :)
Need plugins dialog!!
:)

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

User avatar
Kulche
Inhabitant of a Country
Reactions:
Posts: 969
Joined: Wed Jun 07, 2017 20:28
Location: 2hot2tell
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Light animations

#2

Post by Kulche » Mon Aug 12, 2019 8:17

Thanks.
Don't ask about proper night definitions and tutorials because they will come out later.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 43
Joined: Thu Mar 28, 2019 9:34
Location: Manila, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Light animations

#3

Post by Lakan Haraya » Mon Aug 12, 2019 11:30

Heya!! I think, this is what I'm looking for! Hmm... Thanks @CommanderABab
Ako ang iyong Haráya
I am your Imagination

Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.
____________________________
Taumbayan

Sparkle8538
Small-town resident
Reactions:
Posts: 25
Joined: Fri Jul 26, 2019 11:35
Plugins: Show

Re: Light animations

#4

Post by Sparkle8538 » Thu Aug 29, 2019 14:37

Night frames not animation?

Code: Select all

"night frames":[{"bmp":"YOUR_FRAMES_HERE.png"}]

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

Platform

Plugin Creator

Re: Light animations

#5

Post by CommanderABab » Thu Aug 29, 2019 18:17

Maybe, ...
770!770Currently using alpha 770. 770 What's new? :)
Need plugins dialog!!
:)

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

User avatar
Kulche
Inhabitant of a Country
Reactions:
Posts: 969
Joined: Wed Jun 07, 2017 20:28
Location: 2hot2tell
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Light animations

#6

Post by Kulche » Thu Aug 29, 2019 18:19

No, it doesn't work that way.
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

Sparkle8538
Small-town resident
Reactions:
Posts: 25
Joined: Fri Jul 26, 2019 11:35
Plugins: Show

Re: Light animations

#7

Post by Sparkle8538 » Thu Aug 29, 2019 18:21

Maybe lobby must launch it

User avatar
A guy from Malaysia
Former guy from Shireport
Reactions:
Posts: 4696
Joined: Fri Feb 10, 2017 17:40
Location: Seven-Eleven
Plugins: Show
Version: Beta

Platform

Re: Light animations

#8

Post by A guy from Malaysia » Fri Aug 30, 2019 12:29

Sparkle8538 wrote:
Thu Aug 29, 2019 18:21
Maybe lobby must launch it
what?
Image
...Goodbye Stefan, You always be number one 1975-2018

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest