Cars
Moderator: Plugin Moderators
- TheFennekin
- Neighborhood fox
- Reactions:
- Posts: 2728
- Joined: 24 Aug 2017, 11:17
- Location: Wandering around
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
Q: How do you put night anims on cars? Is it just like how you do it for buildings or no? Also, if I have for example multiple variants of a single car on one image and id, how do I put night anims on them?
- TheFennekin
- Neighborhood fox
- Reactions:
- Posts: 2728
- Joined: 24 Aug 2017, 11:17
- Location: Wandering around
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
What does the "v2":[insert value] do? How do I use them?
Anyway, I offset the truck by using the "v2" (I don't remember what its actually for) and it worked but I concern this is not the correct way.
Code: Select all Reset
"frames":[{"bmp":"JBPM_Scania.png","count":4,"h":22,"w":23}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{},"swat"{}}}, "speed":1.1, "type":"car", "v2":[-2,-2,-2,-2], "override":trueJSON checker
- Yakka
- Inhabitant of a Conurbation
- Reactions:
- Posts: 416
- Joined: 06 Jan 2020, 09:57
- Location: Java-indonesia
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
Something like hadle y for frames.TheFennekin wrote: ↑29 Mar 2022, 06:11What does the "v2":[insert value] do? How do I use them?
Anyway, I offset the truck by using the "v2" (I don't remember what its actually for) and it worked but I concern this is not the correct way.
Code: Select all Reset
"frames":[{"bmp":"JBPM_Scania.png","count":4,"h":22,"w":23}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{},"swat"{}}}, "speed":1.1, "type":"car", "v2":[-2,-2,-2,-2], "override":trueJSON checker
- TheFennekin
- Neighborhood fox
- Reactions:
- Posts: 2728
- Joined: 24 Aug 2017, 11:17
- Location: Wandering around
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
Code: Select all Reset
[ { "id":"toyotaae86.trueno", "type":"car", "frames":[ {"bmp":"normal.png","count":4,"w":11,"h":8}], "v2":[0,0,0,0,0,0,0,0], "speed":1.3, "frames per variant" :8 }, { "id":"toyotaae86.trueno.drift", "type":"car", "frames per variant" :8, "frames":[ {"bmp":"drift.png","count":4,"w":11,"h":8}], "v2":[0,0,0,0,0,0,0,0], "speed":1 } ]
JSON checker
- Ryk_Mak_2050
- Settler
- Reactions:
- Posts: 4
- Joined: 25 Dec 2021, 18:57
Re: Cars
Can I have the code on Police Cars that works when I press the emergency button? I wanna have 7 Police Cars in my 3x3 Dense Big Police Station plugin that I currently working on.
Last edited by Ryk_Mak_2050 on 22 May 2022, 14:40, edited 3 times in total.
- THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4314
- Joined: 14 Sep 2017, 17:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
I have been working on a car plugin this week-end, and I'd like to know if there is a way to create a group of cars (different models & different colours) for one category (TTT residential, T industrial, police and so on) to override vanilla cars with new ones. Is that something feasible
- CommanderABab
- AB
- Reactions:
- Posts: 11135
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Cars
- You can see how to override cars at the start of this thread, but to add cars to certain types of buildings, use this instead.
- Found here: viewtopic.php?p=6839#p6839
- Ryk_Mak_2050
- Settler
- Reactions:
- Posts: 4
- Joined: 25 Dec 2021, 18:57
Re: Cars
I have a code problem that is not working when adding some codes. And causes this. Please help.
Here's my code:
[
{
"id": "$dense.pol.station.150",
"type": "police",
"author": "Plugin creator website 3.0 & Ryk_Mak_2050",
"width": 3,
"height": 3,
"frames": [
{
"bmp": "Dense Police Station.png"
}
],
"title": "Dense Police Station",
"text": "To accommodate your densely populated city. It has 7 Police Cars to patrol and respond to crime quickly.",
"price": 70000,
"influence police": 120,
"performance": true,
"car spawner": [{
"id": "$carpolice00",
"type": "car",
"frames": [{
"x": 896,
"y": 618,
"w": 32,
"h": 20,
"count": 4
}],
"frames per variant": 4,
"flag military": true,
"flag airport": true,
"flag emergency": true,
"chargeable": false,
"meta":{"tags":{"$carpolice00":{}}}
],
"monthly price": 150,
"build time": 47,
"power": -15,
"water": -15
}
]
Here's my code:
[
{
"id": "$dense.pol.station.150",
"type": "police",
"author": "Plugin creator website 3.0 & Ryk_Mak_2050",
"width": 3,
"height": 3,
"frames": [
{
"bmp": "Dense Police Station.png"
}
],
"title": "Dense Police Station",
"text": "To accommodate your densely populated city. It has 7 Police Cars to patrol and respond to crime quickly.",
"price": 70000,
"influence police": 120,
"performance": true,
"car spawner": [{
"id": "$carpolice00",
"type": "car",
"frames": [{
"x": 896,
"y": 618,
"w": 32,
"h": 20,
"count": 4
}],
"frames per variant": 4,
"flag military": true,
"flag airport": true,
"flag emergency": true,
"chargeable": false,
"meta":{"tags":{"$carpolice00":{}}}
],
"monthly price": 150,
"build time": 47,
"power": -15,
"water": -15
}
]
- Ryk_Mak_2050
- Settler
- Reactions:
- Posts: 4
- Joined: 25 Dec 2021, 18:57
Re: Cars
I've got the easy code to increase Police count in my Dense Police Station plugin. which is:CommanderABab wrote: ↑07 Jun 2022, 03:49
You can see how to override cars at the start of this thread, but to add cars to certain types of buildings, use this instead.
Screenshot_20220606-185227_Chrome.jpg Found here: viewtopic.php?p=6839#p6839
"service cars": <# of cars
Or in my case:
"service cars": 7
P.S. this reply was veerrry late hehe
- Londoncuz II
- Settler
- Reactions:
- Posts: 3
- Joined: 11 Aug 2022, 14:17
Re: Cars
Hello? Yes, I'm trying to override existing vanilla police/fire/ambulance cars by using this in my code
"Id":"$carswat00"
And adding
"override":"true,
With my code but It wont work. Has the code been changed or am I doing it wrong?
Full code
[
{
"id":"$carswat00",
"v2":true,
"type":"bus",
"override":true,
"frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}]
}
]
"Id":"$carswat00"
And adding
"override":"true,
With my code but It wont work. Has the code been changed or am I doing it wrong?
Full code
[
{
"id":"$carswat00",
"v2":true,
"type":"bus",
"override":true,
"frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}]
}
]
- Bearbear76
- Former Bearbear65
- Reactions:
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Cars
I'm going to assume this is just a typo in the post. Do you get any errors? What do you mean when you say it doesn't work?Londoncuz II wrote: ↑02 Nov 2022, 02:17Hello? Yes, I'm trying to override existing vanilla police/fire/ambulance cars by using this in my code
"Id":"$carswat00"
And adding
"override":"true,
With my code but It wont work. Has the code been changed or am I doing it wrong?
Full code
[
{
"id":"$carswat00",
"v2":true,
"type":"bus",
"override":true,
"frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}]
}
]
Code: Select all Reset
[ { "id":"$carswat00", "v2":true, "type":"bus", "override":true, "frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}] } ]
JSON checker
- Londoncuz II
- Settler
- Reactions:
- Posts: 3
- Joined: 11 Aug 2022, 14:17
Re: Cars
Sorry should of explained better, the error I have when loading the json code is - "when loading "$carswat00", no value for X"
I double checked the code for the car and it should work as its identical to my other cars I have working in game without issue, that's why I came to the conclusion that theres and issue with the ID, unless I'm wrong.
I double checked the code for the car and it should work as its identical to my other cars I have working in game without issue, that's why I came to the conclusion that theres and issue with the ID, unless I'm wrong.