Light animations

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Light animations

Post by CommanderABab »

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
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.
You do not have the required permissions to view the files attached to this post.
my avatar:
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Light animations

Post by Kulche »

Thanks.
Don't ask about proper night definitions and tutorials because they will come out later.
get yoked!!
User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 131
Joined: 28 Mar 2019, 07:34
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Light animations

Post by Lakan Haraya »

Heya!! I think, this is what I'm looking for! Hmm... Thanks @CommanderABab
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
S
Sparkle8538
Small-town resident
Reactions:
Posts: 25
Joined: 26 Jul 2019, 09:35
Plugins: Showcase Store

Re: Light animations

Post by Sparkle8538 »

Night frames not animation?

Code: Select all

"night frames":[{"bmp":"YOUR_FRAMES_HERE.png"}]
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Light animations

Post by CommanderABab »

Maybe, ...
my avatar:
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Light animations

Post by Kulche »

No, it doesn't work that way.
get yoked!!
S
Sparkle8538
Small-town resident
Reactions:
Posts: 25
Joined: 26 Jul 2019, 09:35
Plugins: Showcase Store

Re: Light animations

Post by Sparkle8538 »

Maybe lobby must launch it
User avatar
malsa
Inhabitant of a Multiverse
Reactions:
Posts: 5078
Joined: 10 Feb 2017, 15:40
Location: Malaysia
Plugins: Showcase Store
Version: Beta

Platform

Re: Light animations

Post by malsa »

Sparkle8538 wrote: 29 Aug 2019, 16:21 Maybe lobby must launch it
what?
1
1Code
Inhabitant of a Megacity
Reactions:
Posts: 283
Joined: 30 Jan 2020, 14:56
Location: https://bit.ly/3P5dhnT
Plugins: Showcase Store

Plugin Creator

Platform

Re: Light animations

Post by 1Code »

What is the minimum version for this?
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Light animations

Post by CommanderABab »

Probably 1.7.43 to be safe.
my avatar:
a
anhkatori2k
Villager
Reactions:
Posts: 22
Joined: 10 Jan 2019, 18:29
Plugins: Showcase Store

Re: Light animations

Post by anhkatori2k »

How to add night animations to slope frames ?
Previous topicNext topic