Cars

Learn here how to create and use plugins.

Moderators: Plugin Moderators, Scenario Moderators

User avatar
JustAnyone
Developer
Posts: 3598
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Cars

#141

Post by JustAnyone »

If it isn't yet, it should be.

User avatar
黑色高级市长
Settler
Posts: 5
Joined: 15 Nov 2022, 12:56

Re: 关于:汽车

#142

Post by 黑色高级市长 »

I made a new police car and its matching generator. But it's got the wrong lights.

Code: Select all    Reset

{ "id":"VCPD",
"type":"car",
"frames":[{"bmp":"VCPD.png","w":19,"h":20,"count":4}],
"v2":true,
"speed": 1.16,
"flag normal":false,
"flag pkw":true,
"animation": [
{
"id":"VCPD",
"pos":[13,-10, 6,-4, -2,-9, 7,-13],
"important":true,
"normalize pos": false
},
{
"id":"VCPD",
"pos":[15,-9, 8,-5, 0,-8, 9,-14],
"important":true,
"normalize pos": false
},
{
"id": "carlight_red",
"pos": [0, 0, 0, 5, 10, 11, 0, 0],
"frames": [1,2]
},
{
"id": "carlight_red",
"pos": [0, 0, 4, 10 , 14, 9, 0, 0],
"frames": [1,2]
},
{
"id": "carlight_yellow",
"pos": [10, 10, 0, 0, 0, 0, 1, 10],
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
JSON checker

Output: Select all

...

User avatar
黑色高级市长
Settler
Posts: 5
Joined: 15 Nov 2022, 12:56

Re: Cars

#143

Post by 黑色高级市长 »

How to spawm a police car that can respond to the emergency?
I made a police car and a spawn.When I called the police, the police car wouldn't turn on the warning lights and didn't respond.

Code: Select all    Reset

[{ "id":"LAPD car",
"type":"car",
"frames":[{"bmp":"LAPD police car.png","w":18,"h":11,"count":4}],
"v2":true,
"speed": 1.16,
"flag normal":false,
"flag pkw":false,
"flag military":true,
"flag airport":true,
"flag emergency": true,
"chargeable": false,
"animation": [
{
"id":"$animationcaralertlights00",
"pos":[15,-6, 9,-6, 9,-9, 15,-9],
"important":true,
"normalize pos": false
},
{
"id":"$animationcaralertlights00",
"pos":[17,-5, 7,-5, 7,-10, 17,-10],
"important":true,
"normalize pos": false
},
{
"id": "carlight_red",
"pos": [0, 0, 1, 7, 13, 9, 0, 0],
"frames": [1,2]
},
{
"id": "carlight_red",
"pos": [0, 0, 4, 9 , 16, 7, 0, 0],
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
JSON checker

Output: Select all

...
Attachments
Mueli_23-07-22_14.30.47.png

User avatar
Alparingitlgnd5
Townsman
Posts: 78
Joined: 31 Jul 2020, 17:45
Location: Las Pinas, Philippines
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Cars

#144

Post by Alparingitlgnd5 »

hello guys I need a little help here, I think my code is currently right here:
[{
"id":"High_Ngyace",
"type:car",
"frames":[{"bmp":"Pre HIACE.png","w":76,"h":13,"count":4},{"bmp":"Pre Hiace Diagonal.png", "w":50, "h":16,"count":4}],
"frames per variant": 8,
"v2":true
}],
[{
"id": "ampanget_residential",
"frames": [{"bmp": "3x3.png"}],
"type": "residential",
"text": "cigarette ka na walang land",
"author":"Alparingitlgnd5",
"width": 3,
"height": 3,
"price":10,
"monthly price": 1,
"bulldoze price": 1,
"power": 1,
"water": 1,
"burnable": true,
"destroyable": true,
"needs road": true,
"pickable": true }]


It's about the diagonals, how can I implement it I am very confused also I forgot here's the attachment I captured
Screenshot 2023-07-31 9.35.08 AM.png
Screenshot 2023-07-31 9.35.08 AM.png (8.86 KiB) Viewed 18096 times

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Cars

#145

Post by burgernamn »

if i wanted to set my car to go 1 kmph, what number would i set it to

User avatar
Kulche
Pluche
Posts: 1210
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#146

Post by Kulche »

If you think theotown uses metric you're very wrong

User avatar
CommanderABab
AB
Posts: 11273
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#147

Post by CommanderABab »

burgernamn wrote:
03 Oct 2023, 09:21
if i wanted to set my car to go 1 kmph, what number would i set it to
.1

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Cars

#148

Post by burgernamn »

Kulche wrote:
03 Oct 2023, 13:41
If you think theotown uses metric you're very wrong
oh- so they use the american measuring system? (i forgor the name)

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Cars

#149

Post by burgernamn »

CommanderABab wrote:
14 Oct 2023, 02:32
burgernamn wrote:
03 Oct 2023, 09:21
if i wanted to set my car to go 1 kmph, what number would i set it to
.1
ah i see
and if i wanted to add another kmph i added another .1?

User avatar
Kulche
Pluche
Posts: 1210
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#150

Post by Kulche »

TheoTown units are arbitrary and do not represent any real life units, be it kmph, mps or mph

User avatar
CommanderABab
AB
Posts: 11273
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#151

Post by CommanderABab »

burgernamn wrote:
20 Oct 2023, 09:48
CommanderABab wrote:
14 Oct 2023, 02:32
burgernamn wrote:
03 Oct 2023, 09:21
if i wanted to set my car to go 1 kmph, what number would i set it to
.1
ah i see
and if i wanted to add another kmph i added another .1?
:) sounds reasonable.

User avatar
Ostrovsk
Villager
Posts: 22
Joined: 13 Oct 2023, 18:31

Re: Cars

#152

Post by Ostrovsk »

Screenshot_2024-09-12-10-10-31-59_b9c7f85ab9c096b4378029bc61eaf2d6.jpg
Good day everyone, is it possible to fix the problem when one bus constantly enters another? (An object within an object). Screenshot attached

User avatar
CommanderABab
AB
Posts: 11273
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#153

Post by CommanderABab »

Ostrovsk wrote:
12 Sep 2024, 11:30
Screenshot_2024-09-12-10-10-31-59_b9c7f85ab9c096b4378029bc61eaf2d6.jpgGood day everyone, is it possible to fix the problem when one bus constantly enters another? (An object within an object). Screenshot attached
If you have a plugin that adds buses, it might not be behaving well code-wise.

User avatar
Ostrovsk
Villager
Posts: 22
Joined: 13 Oct 2023, 18:31

Re: Cars

#154

Post by Ostrovsk »

CommanderABab wrote:
16 Sep 2024, 17:42
Ostrovsk wrote:
12 Sep 2024, 11:30
Screenshot_2024-09-12-10-10-31-59_b9c7f85ab9c096b4378029bc61eaf2d6.jpgGood day everyone, is it possible to fix the problem when one bus constantly enters another? (An object within an object). Screenshot attached
If you have a plugin that adds buses, it might not be behaving well code-wise.
I kind of found the root of the problem, inserted the command "Length", I don't know if it's right, but it seems to have helped
Thank you for the answer)

User avatar
CommanderABab
AB
Posts: 11273
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

#155

Post by CommanderABab »

:)

User avatar
Ostrovsk
Villager
Posts: 22
Joined: 13 Oct 2023, 18:31

Re: Cars

#156

Post by Ostrovsk »

Good day, I would like to know if it is possible to put a flag on a road decoration so that certain vehicles move only where there is this road decoration. I want to make a semblance of a route for my buses. So that they move only where they need to, without driving around the city randomly😁😁

User avatar
FVI
Inhabitant of a Galaxy Cluster
Posts: 2401
Joined: 22 Feb 2022, 18:00
Location: The largest island in Europe
Plugins: Showcase Store
Version: Beta

Platform

Re: Cars

#157

Post by FVI »

Ostrovsk wrote:
28 Nov 2024, 00:43
Good day, I would like to know if it is possible to put a flag on a road decoration so that certain vehicles move only where there is this road decoration. I want to make a semblance of a route for my buses. So that they move only where they need to, without driving around the city randomly😁😁
You should add on the cars' code the attribute "targets" and then the ID of the building/deco you want to attract cars to, just like you would do with an animation

User avatar
duoe
Settler
Posts: 1
Joined: 22 Apr 2024, 11:40

Re: Cars

#158

Post by duoe »

I can’t find the train tutorial. Could someone show how json need to look like and the example png texture ?

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”