[Resolved] How can cars appear in buildings?

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

User avatar
Maroy_of_tt323
Townsman
Reactions:
Posts: 47
Joined: 20 Oct 2019, 05:28
Location: Tangshan, Hebei, China
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

[Resolved] How can cars appear in buildings?

#1

Post by Maroy_of_tt323 »

Screenshot_20200113_131524_com.estrongs.android.pop.jpg
I want the car to appear near the building.But I didn't find the right code.
Can anyone help me?
User avatar
CommanderABab
AB
Reactions:
Posts: 11103
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How can cars appear in buildings?

#2

Post by CommanderABab »

These are the things that may be used to make your own vehicle if desired.
It can be a lot of work to make them look nice!

Code: Select all

{//optional  , this one lights the entire vehicle at night.  It is quite small.
		"id": "$mycaranim",
		"type": "animation",
		"light":true,
		"light switching":false,
		"frames": [{
			"bmp": "mycaranim.png",
			"w": 13,
			"h": 15,
			"target w":6,
			"target h":6,
			"count": 4
		}]
	},
	{
		"id": "$mycar",
		"type": "car",
		
		"frames": [{//see documentation for vehicle graphics examples
			"bmp": "mycar.png",
			"w": 13,
			"h": 15,
			"target w":6,
			"target h":6,
			"count": 4
		}],
		"animation": [{  //optional
				"id": "$mycaranim",
				"pos": [0, 0, 0, 0, 0, 0, 0, 0]  //array of xyxyxyxy positions for animation to appear on vehicle

			}
			
		],
		"v2": [2, 2, 2, 2],  //unsure, I think required by an update
		"capacity": 11,
		"speed": 1,
		"flag normal": true,  // flags of roads vehicle can use
		"flag user2": true,
		"meta": {   //optional, special services vehicle may provide
			"tags": {
				"fire brigade": {},
				"garbage": {}

			}
		}
	},
If you just want an already defined vehicle to appear around your building, then use:

. :)

Code: Select all

"car spawner": [{
			"cars": ["$carid1"  //,"$carid2"  etc

			],
			"flags": ["fire brigade"],  //if a vehicle has a special use then use this.  Otherwise no.
			"targets":["buildingid","orbuildingtype"],  //array of building ids for vehicle to attempt to visit.  (Can cause traffic problems)
			"count": 2,
			"radius": 4000  //this would go over the whole map. Use 5,10 or 20 to keep them near the building.

		}]
User avatar
CommanderABab
AB
Reactions:
Posts: 11103
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How can cars appear in buildings?

#3

Post by CommanderABab »

viewtopic.php?p=22167#p22167

This is the link to the main topic about using cars.
User avatar
Maroy_of_tt323
Townsman
Reactions:
Posts: 47
Joined: 20 Oct 2019, 05:28
Location: Tangshan, Hebei, China
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How can cars appear in buildings?

#4

Post by Maroy_of_tt323 »

@CommanderABab
Thank you
User avatar
CERRERA
Townsman
Reactions:
Posts: 48
Joined: 25 Jan 2020, 06:19
Location: Philippines
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: [Resolved] How can cars appear in buildings?

#5

Post by CERRERA »

Hello
How can I add the type of building as a target

Code: Select all    Reset

"targets":["railway station"]
JSON checker
Check
this one dosen't work
Post Reply Previous topicNext topic

Return to “Problems”