Cars
Moderator: Plugin Moderators
- CommanderABab
- AB
- Reactions:
- Posts: 9118
- Joined: Tue Jun 07, 2016 21:12
- Plugins: Show
- Version: Beta
Re: Cars, did you know? Designating level in car spawner.
Code: Select all
"car spawner":[
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":-1,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":0,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":1,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":2,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":3,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":1000,
"radius":3000,
"level":4,
"targets":[
"$busdepot00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$easteregg00",
"$busstop00",
"$busdepot00",
"$railstation00",
"$bigpark00" ,
"$easteregg00"
]
},
{
"cars":["$bigcarplugin63"],
"count":100,
"radius":300,
"level":1
}
],
So, if car spawner designates level 3 for a car(s), then that/those car(s) you would spawn directly to a level 3 bridge next to the building.
I think default ground level would be 0.

- CommanderABab
- AB
- Reactions:
- Posts: 9118
- Joined: Tue Jun 07, 2016 21:12
- Plugins: Show
- Version: Beta
Re: Cars
Your .json with commas expanded to commas and linefeed:
Should be:
I redacted multiple uses of the same .png in the frames statements for the car, but that wasn't causing your problem. The json being an array [] of objects {}, didn't start with the initial [, which was later in the file. I moved it to the beginning.
Code: Select all
{ "id":"milkcar.28eu9jd",
"type":"car",
"frames":[ {"bmp":"milkcar.png",
"w":15,
"h":10,
"count":4} ,
{"bmp":"milkcar.png",
"w":15,
"h":10,
"count":4},
{"bmp":"milkcar.png",
"w":15,
"h":10,
"count":4} ],
"v2":true,
"capacity":1,
"flag normal":false,
"flag user2":true },
[ { "id":"milfarm929jd",
"type":"industrial",
"workers":190,
"author":"Lancaster Kingdom",
"width":1,
"height":1,
"frames":[{"bmp":"milkfarm.png"}],
"smoke":[{"id":"$smoke07",
"x":13,
"y":-14}],
"level":3,
"car spawner":[ { "cars":["milkcar.28eu9jd"],
"radius":100,
"count":70 } ] } ]
Code: Select all
[{ "id":"milkcar.28eu9jd",
"type":"car",
"frames":[ {"bmp":"milkcar.png",
"w":15,
"h":10,
"count":4} ],
"v2":true,
"capacity":1,
"flag normal":false,
"flag user2":true },
{ "id":"milfarm929jd",
"type":"industrial",
"workers":190,
"author":"Lancaster Kingdom",
"width":1,
"height":1,
"frames":[{"bmp":"milkfarm.png"}],
"smoke":[{"id":"$smoke07",
"x":13,
"y":-14}],
"level":3,
"car spawner":[ { "cars":["milkcar.28eu9jd"],
"radius":100,
"count":70 } ] } ]

- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2103
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Cars
Is there a template for emergency vehicles, like SWAT vans, to be specific?Lobby wrote: ↑Fri Jan 26, 2018 1:512. You have to add this into your bus definition:The bus will then be added to the variants of busses.Code: Select all
"template":"$template_bus00"
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2103
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Cars
I took a look at the SWAT van's definition, and I didn't find anything out of the ordinary that seemed to give it the functionality I wanted. Are the emergency vehicles hard-coded?
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
- JustAnyone
- Rip-off engineer
- Reactions:
- Posts: 3031
- Joined: Sun Jul 23, 2017 12:45
- Location: Easter Island
- Plugins: Show
Re: Cars
Yes
- THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4263
- Joined: Thu Sep 14, 2017 17:30
- Location: Astrellia, UHAE
- Plugins: Show
- Version: Beta
Re: Cars
I was wondering lately if it would be possible to allow a vehicle to spawn from a specific income level / category building such as T Industrial, TTT Residential and etc... as i am resuming work on a very old plugin i used to work on which would add new TTT / TT or T vehicles for existing buildings.
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
- CommanderABab
- AB
- Reactions:
- Posts: 9118
- Joined: Tue Jun 07, 2016 21:12
- Plugins: Show
- Version: Beta
- CommanderABab
- AB
- Reactions:
- Posts: 9118
- Joined: Tue Jun 07, 2016 21:12
- Plugins: Show
- Version: Beta
Re: Cars
Code: Select all
"car spawner":[
{
"cars":["$yourcarid","$anothercarid","$etccarid"],
"flags": ["garbage"],
"count":36,
"radius":1300
}
],
count should probably be lower.
radius should be less if you like to see your vehicles near the building only.

- TheoKier[YT]
- Villager
- Reactions:
- Posts: 11
- Joined: Fri Sep 11, 2020 4:58
Re: Cars
Pls help me i try to put it on my json with the building but when i open theotown it says n is negative and i cant play the game pls help whats the json for garbage car/truck...
- TheoKier[YT]
- Villager
- Reactions:
- Posts: 11
- Joined: Fri Sep 11, 2020 4:58
Re: Cars
I tried the car spawner thing pls help is there a json for the car also that will not ruined the json for my building?
- TheFennekin
- Neighborhood fox
- Reactions:
- Posts: 2217
- Joined: Thu Aug 24, 2017 11:17
- Location: Tokyo
- Plugins: Show
- Version: Beta
Re: Cars
Can you please show your json please?