Cars

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Imran M
Inhabitant of a Megalopolis
Reactions:
Posts: 643
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Cars

#61

Post 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.
Attachments
space.zip
(7.93 KiB) Downloaded 41 times
I have no clue what's happening this year

User avatar
Lobby
Developer
Reactions:
Posts: 3536
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: Cars

#62

Post 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.
=^._.^= ∫

User avatar
Imran M
Inhabitant of a Megalopolis
Reactions:
Posts: 643
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Cars

#63

Post by Imran M »

Thanks! I didn't know that!
I have no clue what's happening this year

User avatar
Imran M
Inhabitant of a Megalopolis
Reactions:
Posts: 643
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Cars

#64

Post by Imran M »

Meh, close enough.
Attachments
Okerak_18-12-14_12.27.26.png
I have no clue what's happening this year

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

Platform

Plugin Creator

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

#65

Post 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.
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Faayr
Former Lancaster Kingdom
Reactions:
Posts: 1469
Joined: Wed Sep 20, 2017 21:38
Location: Arelosov Palace, Ludonesk, Surrev
Plugins: Show

Platform

Plugin Creator

Re: Cars

#66

Post by Faayr »

What's wrong with that?
farmmilk.zip
(3.54 KiB) Downloaded 23 times
Czarist Federation of Surrev

Glory to Fatherland! Glory to Czar!
Czar- Faayr IV
Prime Minister- Kenya Macarov

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

Platform

Plugin Creator

Re: Cars

#67

Post 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.
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
DESOLAN
Villager
Reactions:
Posts: 12
Joined: Sat Jan 25, 2020 6:19
Plugins: Show

Re: Cars

#68

Post by DESOLAN »

How about elevated train

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2047
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#69

Post by KINGTUT10101 »

Lobby wrote:
Fri Jan 26, 2018 1: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?

User avatar
Lobby
Developer
Reactions:
Posts: 3536
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: Cars

#70

Post 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.
=^._.^= ∫

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2047
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#71

Post 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?

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2922
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Cars

#72

Post by JustAnyone »

Yes

User avatar
THEMAX
Inhabitant of a Universe
Reactions:
Posts: 4236
Joined: Thu Sep 14, 2017 17:30
Location: Astrellia, UHAE
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cars

#73

Post by THEMAX »

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
Image
Founder state of Internationxal council
Leader of AEOY and steel pact

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

Platform

Plugin Creator

Re: Cars

#74

Post by CommanderABab »

Yes
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
THEMAX
Inhabitant of a Universe
Reactions:
Posts: 4236
Joined: Thu Sep 14, 2017 17:30
Location: Astrellia, UHAE
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cars

#75

Post by THEMAX »

how can this be done then ?
Emperor of Atlantean federated empire
Image
Founder state of Internationxal council
Leader of AEOY and steel pact

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

Platform

Plugin Creator

Re: Cars

#76

Post by CommanderABab »

Code: Select all

"car spawner":[
           {
             "cars":["$yourcarid","$anothercarid","$etccarid"],
             "flags": ["garbage"],
             "count":36,
             "radius":1300          
           }
         ],
garbage for example of flags.
count should probably be lower.
radius should be less if you like to see your vehicles near the building only.
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”