Cars

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Zoll
Settler
Reactions:
Posts: 7
Joined: Thu Oct 29, 2020 6:12

Re: Cars

#81

Post by Zoll »

Why does some frame of my truck offset?

This happen sometimes but I don't understand why.
I used to just move their position in the image, not sure if that's how we supposed to deal with it :shock:
Screenshot_2020-11-08-10-58-57-73.png
Screenshot_2020-11-08-10-58-46-85.png
Screenshot_2020-11-08-10-58-30-32.png
He's moving, not parked at side of the road, it just you can't see it
Screenshot_2020-11-08-10-59-08-19.png

The code:

Code: Select all    Reset

[{ "flag normal":true, "flag pkw":false, "frames":[{"bmp":"JBPM_ScaniaP310.png","count":4,"h":19,"w":25}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{}}}, "speed":1, "type":"car", "v2":true, "override":true }]
JSON checker
Check
Probably because the override?

Are my placement in texture is corrrct?
JBPM_ScaniaP310.png
JBPM_ScaniaP310.png (1.54 KiB) Viewed 1303 times
Please don't use the texture yet, it's not done and looks weird. I will publish it when he's good. Not sure why I named it P310.

User avatar
Zman The Man
Some Guy
Reactions:
Posts: 467
Joined: Thu Oct 01, 2020 4:19
Location: New Zealand, New Plymouth
Plugins: Show
Version: Beta

Re: Cars

#82

Post by Zman The Man »

That car is playing GTA IV but the pedestrians are wiser NOT to walk

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

Platform

Plugin Creator

Re: Cars

#83

Post by CommanderABab »

More disturbing is that you are overriding the default fire truck which fights fires and giving it only the ability to act as an ambulance.

byframes101.png
byframes101.png (1.7 KiB) Viewed 1277 times
bigrescars.png
bigrescars.png (1.08 KiB) Viewed 1277 times
...............:) .Image

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2454
Joined: Thu Aug 24, 2017 11:17
Location: A coffin
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cars

#84

Post by TheFennekin »

I also got this issue in my drifitng AE86 and other self made cars I did but just move each car frame up and down and try to see if it fits the road nicely. Basically just trial and error.
Sorry but I'm on a break :(

Inactive

User avatar
Zoll
Settler
Reactions:
Posts: 7
Joined: Thu Oct 29, 2020 6:12

Re: Cars

#85

Post by Zoll »

Zman The Man wrote:
Sun Nov 08, 2020 8:48
That car is playing GTA IV but the pedestrians are wiser NOT to walk
Ye, actually.. the truck went for its safety.
Tero_20-11-05_12.11.14.png


CommanderABab wrote:
Sun Nov 08, 2020 15:01
More disturbing is that you are overriding the default fire truck which fights fires and giving it only the ability to act as an ambulance.
What is the fifth frame of green car represent?
I spaced it 2 pixel on purpose, is it bad?

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":true
JSON checker
Check
VehiclesTest_20-11-15_07.22.40.png
you see no potato

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

Platform

Plugin Creator

Re: Cars

#86

Post by CommanderABab »

Lol, I see a potato.

The fifth frame is only an error check. :)
...............:) .Image

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 127
Joined: Thu Mar 28, 2019 9:34
Location: Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Cars

#87

Post by Lakan Haraya »

Diagonal oriented Cars is here... v1966
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2454
Joined: Thu Aug 24, 2017 11:17
Location: A coffin
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cars

#88

Post by TheFennekin »

Lakan Haraya wrote:
Sun Jan 10, 2021 6:29
Diagonal oriented Cars is here... v1966
Wait... what?
Sorry but I'm on a break :(

Inactive

User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 295
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Cars

#89

Post by Kiki012 »

Where is Diagonal car tutorial?

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

Platform

Re: Cars

#90

Post by JustAnyone »

Diagonal cars just use 8 instead of 4 frames.
4 for diagonal axis and 4 normally.

All you just need to do is specify "frames per variant": 8 attribute for the car drafts.

The following example is how diagonal firetrucks are implemented

Code: Select all    Reset

[{ "id":"$carfirebrigade00", "type":"car", "frames":[ {"x":512,"y":657,"w":32,"h":18,"count":4},{"x": 128,"y": 365,"w": 32,"h": 19,"count": 4,"offset y": 3072} // This array has 8 frames ], "frames per variant": 8, // We let the game know that we use 8 frames per variant, otherwise it would treat 8 frames as 2 separate variants "animation":[ { "id":"$animationcaralertlights00", "pos":[16,-10, 10,-4, -4,-9, 4,-13], "important":true }, { "id":"$animationcaralertlights00", "pos":[18,-9, 12,-5, -2,-8, 6,-14], "important":true }, { "id": "carlight_red", "pos": [11, 4, 0, 0, 0, 0, 25, 1], "frames": [0, 3] }, { "id": "carlight_red", "pos": [13, 5, 0, 0, 0, 0, 27, 0], "frames": [0, 3] }, { "id": "carlight_yellow", "pos": [0, 0, 19, 5, 3, 0, 0, 0], "frames": [1, 2] }, { "id": "carlight_yellow", "pos": [0, 0, 21, 4, 5, 1, 0, 0], "frames": [1, 2] } ], "flag military":true, "flag airport":true, "flag emergency": true, "chargeable": false, "meta":{"tags":{"fire brigade":{}}} }]
JSON checker
Check

User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 295
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Cars

#91

Post by Kiki012 »

Dominykas wrote:
Tue Jul 13, 2021 16:47
Diagonal cars just use 8 instead of 4 frames.
4 for diagonal axis and 4 normally.

All you just need to do is specify "frames per variant": 8 attribute for the car drafts.

The following example is how diagonal firetrucks are implemented
Should the frame is same size as non diagonal cars one?
I mean something like this:
BB301 GL DIA.png
BB301 GL DIA.png (608 Bytes) Viewed 371 times
BB301 GL.png
BB301 GL.png (1.45 KiB) Viewed 371 times
Show
note
The image is sample from Indonesia renewal pack,which also my testing plugin before applying to real Indonesia renewal pack plug-in, please credit me if you want to reuse the image

User avatar
yusuf8a684
Inhabitant of a Planet
Reactions:
Posts: 1543
Joined: Sun Dec 10, 2017 22:09
Location: Turkiye
Plugins: Show

Plugin Creator

Platform

Re: Cars

#92

Post by yusuf8a684 »

I think diagonal should be longer
The Internet Addict

don't expect me to finish something

LOL

User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 295
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Cars

#93

Post by Kiki012 »

Can anyone provide an example for very long vehicle,like more than 22pixel in width,in this case i need a example for 1 tile long

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”