After I finally coded a car plugin I want to know how

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

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

Plugin Creator

Platform

After I finally coded a car plugin I want to know how

#1

Post by Alparingitlgnd5 »

I had seen this forum currently viewtopic.php?t=2346
now I am a bit troubled cause the number 2 is.
2. Spawn cars
Now assume we want our sample building "$sample.plugin.unique.id.res00" from our sample plugin to spawn cars from our car plugin "$lobby_carplugin00". We can do that by defining a car spawner with the following attributes:
cars - An array of car ids
radius - Radius for the cars to be spawned. Big radius are heavy on computation, so try to avoid them. To cover the whole map you might use a value like 512
count - Number of cars that should be spawned
targets - An array of building ids that should be targeted by spawned cars. If empty, any buildings will be targeted (default behavior). Entry null will represent the building in which the car spawner is defined (for convenience).
So our plugin may look like
CODE: SELECT ALL

[
{
"id":"$sample.plugin.unique.id.res00",
"type":"residential",
"author":"Lobby & theotheoderich",
"width":1,
"height":1,
"frames":[{"bmp":"sample_bmp.png"}],
"smoke":[{"id":"$smoke07","x":13,"y":-14}],
"level":1,
"car spawner":[
{
"cars":["$lobby_carplugin00"],
"radius":10,
"count":5
}
]
}
]
Please notice that you have to define your car before using it in any other plugin.
now on the "car spawner" do I need to add frames, btw I had made, my own texture of the car
Innovan.png
Innovan.png (506 Bytes) Viewed 918 times
this is v2 but I really still need in help

Return to “Plug-In Discussion”