Car chains

Learn here how to create and use plugins.

Moderator: KoalaGuy

Post Reply
User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: S7 edge

Car chains

Post by Lobby » Thu Dec 07, 2017 19:35

See this thread on how to add custom cars to the game. Since version 385 you can define a chain of cars that behaves as one vehicle. See here an example:
2017-12-07 02.50.37.png
The garbage trucks were appended to the fire brigade truck to form long, connected vehicles. A better use would be for example a tram or a bending bus. There's basically no limit in the length of the chain.

To append cars to a car just use

Code: Select all

"tail":["anotherCarId",...]  // A list of cars to append
To append the car itself just use null as convenient placeholder. So a chain of a car of length 3 would have a tail of length 2:

Code: Select all

"tail":[null,null]
The car ids used in a tail array have to be already defined. Only the first variant will be used for each car in a tail.

The code to achieve the fire-garbage-trains as shown above :json

Code: Select all

[
  {
    "override":true,
    "id":"$carfirebrigade00",
    "type":"car",
    "frames":[{"x":512,"y":657,"w":32,"h":18,"count":4}],
    "tail":["$garbagetruck00","$garbagetruck00","$garbagetruck00","$garbagetruck00"]
  }
]
No extra graphics needed.
Last edited by KoalaGuy on Thu Dec 07, 2017 19:40, edited 1 time in total.
...Have a nice stay

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: [385]Car chains

Post by KoalaGuy » Thu Dec 07, 2017 19:40

Wow, 185 had car chains? Maybe it was in 2008 too :lol:
I corrected the versions
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4213
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: [385]Car chains

Post by Matison55557 » Thu Dec 07, 2017 19:43

185 was end of 2016. ;)
408408: Automatic disasters :bb
XD. sorry, no aizat so someone has to do the job    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: [385]Car chains

Post by KoalaGuy » Thu Dec 07, 2017 20:08

I know...
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

User avatar
Borbor
Inhabitant of a Megacity
Reactions:
Posts: 205
Joined: Thu Apr 27, 2017 14:03
Location: Republic of Turkey
Plugins: Show
Version: Beta
Phone: TT 175

Re: [385]Car chains

Post by Borbor » Thu Dec 07, 2017 20:15

If I ask you to lobby, can you sample the json file?
Plugin maker
My plugins are open source
:bp :mine
http://www.theotown.com/forum/search.ph ... =firstpost
"Our true mentor in life is science."
Mustafa Kemal Atatürk

User avatar
THEMAX
Inhabitant of a Continent
Reactions:
Posts: 1205
Joined: Thu Sep 14, 2017 17:30
Location: Paris, France
Plugins: Show
Version: Beta
Phone: STQAE imperial phone

Re: [385]Car chains

Post by THEMAX » Thu Dec 07, 2017 20:26

I will start to work on my tramway
Emperor of STQAE.
Image
"vive l'empereur et vive l'empire"
have a Nice day
leader of the space, aeronautic, military research , education and Health care

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4213
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: [385]Car chains

Post by Matison55557 » Thu Dec 07, 2017 20:40

Also, the picture shows garbage trucks. So... I hope we will soon see the garbage "dlc"
408408: Automatic disasters :bb
XD. sorry, no aizat so someone has to do the job    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: S7 edge

Re: [385]Car chains

Post by Lobby » Thu Dec 07, 2017 21:08

@Borbor I added the json code to get the chains as shown in the image
@Matison55557 It won't be a DLC
...Have a nice stay

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4213
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: [385]Car chains

Post by Matison55557 » Thu Dec 07, 2017 21:11

By dlc I mean purchased with diamonds, not actual dlc and that's why I putted it in ""
408408: Automatic disasters :bb
XD. sorry, no aizat so someone has to do the job    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: [385]Car chains

Post by KoalaGuy » Thu Dec 07, 2017 21:24

Expansion pack
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

User avatar
Lobby
Developer
Reactions:
Posts: 2580
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone: S7 edge

Re: [385]Car chains

Post by Lobby » Thu Dec 07, 2017 21:29

I know :)
...Have a nice stay

Online
User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1438
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone: Moto Z Force Droid

Re: [385]Car chains

Post by KINGTUT10101 » Sat Dec 09, 2017 17:25

Will there be a tutorial for custom zones soon?

Post Reply

Who is online

Users browsing this forum: Kulche and 1 guest