Re: JSON

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

Chinasapling
Townsman
Reactions:
Posts: 49
Joined: Sun Nov 11, 2018 5:33
Plugins: Show

Platform

Re: JSON

#1

Post by Chinasapling »

:json [
{
"id":"$decarbonatortower00",
"author":"Caliber",
"type":"park",
"width":1,
"height":1,
"influence pollution":-3000,
"influence noise":-3000,
"influence nature":3000,
"influence park":17,
"power": 0,
"water": 0,
"build time":0,
"needs road":true,
"category":"$cat_wastedisposal00",
"title":"Decarbonator Tower",
"text":"It removes too much carbon dioxide (CO2)and it also reduce too much noise in the city.",
"frames":[{"bmp":"Decarbonator Tower.png"}],
"id":"$garbagetrck00",
"type":"car",
"car spawner":[{"cars":["$garbagetrck00"],"count":10,"radius":500}],
"frames":[
{"x":640,"y":668,"w":17,"h":14},
{"x":657,"y":668,"w":18,"h":14},
{"x":675,"y":668,"w":18,"h":14},
{"x":693,"y":668,"w":17,"h":14}
],
"v2":[0,1,0,0],
"speed":0.9,
"flag military":true,
"flag airport":true,
"meta":{"tags":{"garbage":{}}}
}
]
Don't pay attention to copyright first. The question is why there is no building in the game. When I add a car, I can't find it.

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

Platform

Plugin Creator

Re: Re: JSON

#2

Post by CommanderABab »

The car spawner line should be in the code section for the building and not the car.
Image

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

Platform

Plugin Creator

Re: JSON

#3

Post by CommanderABab »

Chinasapling wrote:
Wed Feb 13, 2019 9:48
:json [
{
"id":"$decarbonatortower00",
"author":"Caliber",
"type":"park",
"width":1,
"height":1,
"influence pollution":-3000,
"influence noise":-3000,
"influence nature":3000,
"influence park":17,
"power": 0,
"water": 0,
"build time":0,
"needs road":true,
"category":"$cat_wastedisposal00",
"title":"Decarbonator Tower",
"text":"It removes too much carbon dioxide (CO2)and it also reduce too much noise in the city.",
"frames":[{"bmp":"Decarbonator Tower.png"}],
"id":"$garbagetrck00",
"type":"car",
"car spawner":[{"cars":["$garbagetrck00"],"count":10,"radius":500}],
"frames":[
{"x":640,"y":668,"w":17,"h":14},
{"x":657,"y":668,"w":18,"h":14},
{"x":675,"y":668,"w":18,"h":14},
{"x":693,"y":668,"w":17,"h":14}
],
"v2":[0,1,0,0],
"speed":0.9,
"flag military":true,
"flag airport":true,
"meta":{"tags":{"garbage":{}}}
}
]
Don't pay attention to copyright first. The question is why there is no building in the game. When I add a car, I can't find it.

Code: Select all

[
	{
		"id":"$decarbonatortower00",
		"author":"Caliber",
		"type":"park",
		"width":1, 
		"height":1,
		"influence pollution":-3000,
		"influence noise":-3000,
		"influence nature":3000,
		"influence park":17,
		"power": 0,
		"water": 0,
		"build time":0,
		"needs road":true,
		"category":"$cat_wastedisposal00",
		"title":"Decarbonator Tower",
		"text":"It removes too much carbon dioxide (CO2)and it also reduce too much noise in the city.",
		"frames":[{"bmp":"Decarbonator Tower.png"}],
		"car spawner":[{"cars":["$garbagetrck00"],"count":10,"radius":500}]
		},
		{
		 "id":"$garbagetrck00",
    "type":"car",

    "frames":[
      {"x":640,"y":668,"w":17,"h":14},
      {"x":657,"y":668,"w":18,"h":14},
      {"x":675,"y":668,"w":18,"h":14},
      {"x":693,"y":668,"w":17,"h":14}
    ],
     "v2":[0,1,0,0],
    "speed":0.9,
    "flag military":true,
    "flag airport":true,
    "meta":{"tags":{"garbage":{}}}
	}
]
Let me refer you to cars documentation: https://theotown.com/forum/viewtopic.php?p=22167#p22167
Image

Chinasapling
Townsman
Reactions:
Posts: 49
Joined: Sun Nov 11, 2018 5:33
Plugins: Show

Platform

Re: Re: JSON

#4

Post by Chinasapling »

thank you very much

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”