Page 3 of 8

Re: Cars

Posted: 02 Feb 2018, 01:24
by CommanderABab
My plugins spawn cars just fine. Keep traffic set at 2x or less in the settings. Give the cars targets to go to and a fairly large radius so that they have a chance of finding targets.

Re: Cars

Posted: 04 Jun 2018, 13:24
by Bearbear76
From beta 1.4.84 you can use:

Code: Select all

"v2":[0,0,0,0]
This allows you to shift/move cars by adjusting it's height.
By changing the value you can change the height of the specific frame.
The numbers indicate the frames in this order:
carsample.png
carsample.png (1007 Bytes) Viewed 13219 times
By writing the following you will adjust the 1st and 3rd frame by +1.

Code: Select all

"v2":[1,0,1,0]
Correct me if I'm wrong with any of this information! :json

Re: Cars

Posted: 04 Jun 2018, 17:59
by CommanderABab
That ability has been around for a few versions now.

It will work in the last public version also.

Re: Cars

Posted: 08 Jun 2018, 18:36
by NEPman
I have one question. I want to make ship spawner. How can I write it? As "car spawner" or "ship spawner"?

Re: Cars

Posted: 16 Jul 2018, 13:07
by yusuf8a684
I need tractor textures, where can i find it?

Re: Cars

Posted: 20 Jul 2018, 00:18
by Bearbear76
yusuf8a684 wrote:
16 Jul 2018, 13:07
I need tractor textures, where can i find it?
Couldn't find it in the world texture :bt
But here
Tractors.png
Tractors.png (4.06 KiB) Viewed 12987 times

Re: Cars

Posted: 12 Aug 2018, 16:05
by sairam
I have a problem the car frame partly v1 and v2. How to use the graphics. Please help. I'll upload the frame of car. Here it is.
file_3.png
file_3.png (889 Bytes) Viewed 12858 times

Re: Cars

Posted: 12 Aug 2018, 16:42
by CommanderABab
Screenshot_20180812-101735.jpg

Re: Cars

Posted: 12 Aug 2018, 17:26
by CommanderABab
Or vice versa :)

Re: Cars

Posted: 14 Dec 2018, 12:55
by Imran M
@Lobby Hi, there's something wrong. When I try to use my truck, it says it can't find the I'd.

Re: Cars

Posted: 14 Dec 2018, 13:40
by Lobby
@Imran M That's because of the order in which your files are read in. Rename your "space cars" folder into "a_space cars" to ensure that it will be loaded first.

Re: Cars

Posted: 14 Dec 2018, 13:59
by Imran M
Thanks! I didn't know that!

Re: Cars

Posted: 14 Dec 2018, 14:30
by Imran M
Meh, close enough.

Re: Cars, did you know? Designating level in car spawner.

Posted: 20 Apr 2019, 03:34
by CommanderABab

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           
           }
         ],
That you can spawn cars from different levels?
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.

Re: Cars

Posted: 11 Jul 2019, 18:17
by CommanderABab
Your .json with commas expanded to commas and linefeed:

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 } ] } ]
Should be:

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 } ] } ]
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.

Re: Cars

Posted: 08 Jun 2020, 17:49
by CERRERA
How about elevated train

Re: Cars

Posted: 07 Jul 2020, 01:14
by KINGTUT10101
Lobby wrote:
26 Jan 2018, 01:51
2. You have to add this into your bus definition:

Code: Select all

"template":"$template_bus00"
The bus will then be added to the variants of busses.
Is there a template for emergency vehicles, like SWAT vans, to be specific?

Re: Cars

Posted: 07 Jul 2020, 08:15
by Lobby
No, there's not. You'd have to write the template yourself if you need one. See content_car.json in the json resource topic for the needed attributes.

Re: Cars

Posted: 10 Jul 2020, 17:43
by KINGTUT10101
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?

Re: Cars

Posted: 10 Jul 2020, 19:04
by JustAnyone
Yes