Cars
Moderator: Plugin Moderators
- CommanderABab
- AB
- Posts: 11195
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
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
- Posts: 11195
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
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
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Cars
Is there a template for emergency vehicles, like SWAT vans, to be specific?Lobby wrote: ↑26 Jan 2018, 01: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"
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
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?
- THEMAX
- Inhabitant of a Universe
- Posts: 4314
- Joined: 14 Sep 2017, 17:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
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.
- CommanderABab
- AB
- Posts: 11195
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
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.
Re: Cars
Why does some frame of my truck offset?
This happen sometimes but I don't understand why.
I used to just move their position in the image, not sure if that's how we supposed to deal with it
He's moving, not parked at side of the road, it just you can't see it
The code:
Probably because the override?
Are my placement in texture is corrrct? Please don't use the texture yet, it's not done and looks weird. I will publish it when he's good. Not sure why I named it P310.
This happen sometimes but I don't understand why.
I used to just move their position in the image, not sure if that's how we supposed to deal with it
He's moving, not parked at side of the road, it just you can't see it
The code:
Code: Select all Reset
[{ "flag normal":true, "flag pkw":false, "frames":[{"bmp":"JBPM_ScaniaP310.png","count":4,"h":19,"w":25}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{}}}, "speed":1, "type":"car", "v2":true, "override":true }]
JSON checker
Are my placement in texture is corrrct? Please don't use the texture yet, it's not done and looks weird. I will publish it when he's good. Not sure why I named it P310.