The online racing simulator
How do I make shops in insim?
I am having a hard time understanding how to make shops. Can anyone explain, please?
You have to define a X, Y 'Zone', and you can call this zone anything you want, eg shop, bank, station, hideout, etc.

With so many objects that can now be placed, you can now even make shops, etc, to stand on this zone - or mark the zone with barriers and lines.

How you define the Zone will depend on what InSim or programming language you are using. You will have to advise what this is if you want more specific information - for instance, in lapper, you 'register' a zone, and define the zone name, X and Y stats, and append a sub-routine to run when a driver enters this specific defined zone in one of their cars.
I do not know how to do the 'define x/y Zone' stuff. If I did, I wouldn't have made this post in the first place.
I don't know what you know, just that you asked a question, for which I gave a perfectly good answer. Maybe you should have given more information or worded your question differently?

And you still haven't said what InSim or programming language you are using.
To be completely honest with you. I do not know which one is the best one to use. Heh.
I am still waiting for someone to help if anyone wants to.
It will be difficult to help unless you can tell people what programming language or InSim you're going to use.

In LFSLapper ("lapper"), it's fairly easy.

You would run lapper, drive to the area you want the zone (your shop, bank, etc) to be located, type the command word "!ZONE", and you will be given X and Y co-ordinates. These are used in your code to define your zone.

The 1st part of the code would look like;

RegisterZoneAction( "BL1" , -60,106, 5 , Knocking_Shoppe,"" );

Where -60 is X, 106 is Y, and 5 is how big an area (in metres).

The "Knocking_Shoppe" would be the name of your sub-routine to run when someone enters the proscribed zone.

Example:

Sub Knocking_Shoppe()
<define what happens when you enter proscribed zone,
e.g. open Button with text, such as "Welcome to XDriftingKingx's Knocking Shoppe - all welcome">
EndSub

With other Languages/InSims, likely to be bit more complicated, especially if there's no easy way to get the X and Y co-ordinates.

Like I said in my 1st post, first you define a zone, then you run a sub-routine when someone enters the zone.

In the case of lapper, you use "RegisterZoneAction" to define your zone, then within that line of code, you have name of sub-routine, and you will have a sub-routine code which will run when a driver enters the zone.

In some cases, it would also be possible to do exactly the same with a NODE, but you can't define an area as such, just really a line that crosses the track or layout. The Finish line is a Node that has a sub-routine that runs when you finish the lap/race (e.g. give time and/or position, etc). Nodes are also used to give Split/Sector times.

Lines and objects can be placed at the Zone or Node to help define the place bit better than just an anonymous piece of track or off-track area.

So, to recap;

> define (specify X/Y co-ordinates) the area (zone/node) you want your shop (or whatever) to be on the circuit or layout
> append sub-routine code to run (what's to happen) when driver enters the defined area.

Or to put it another way, think of SatNav - you put in your (ZONE) destination, and when you get there, (SUB_ROUTINE) you get message that you've arrived.
Quote from sinanju :It will be difficult to help unless you can tell people what programming language or InSim you're going to use.

In LFSLapper ("lapper"), it's fairly easy.

You would run lapper, drive to the area you want the zone (your shop, bank, etc) to be located, type the command word "!ZONE", and you will be given X and Y co-ordinates. These are used in your code to define your zone.

The 1st part of the code would look like;

RegisterZoneAction( "BL1" , -60,106, 5 , Knocking_Shoppe,"" );

Where -60 is X, 106 is Y, and 5 is how big an area (in metres).

The "Knocking_Shoppe" would be the name of your sub-routine to run when someone enters the proscribed zone.

Example:

Sub Knocking_Shoppe()
<define what happens when you enter proscribed zone,
e.g. open Button with text, such as "Welcome to XDriftingKingx's Knocking Shoppe - all welcome">
EndSub

With other Languages/InSims, likely to be bit more complicated, especially if there's no easy way to get the X and Y co-ordinates.

Like I said in my 1st post, first you define a zone, then you run a sub-routine when someone enters the zone.

In the case of lapper, you use "RegisterZoneAction" to define your zone, then within that line of code, you have name of sub-routine, and you will have a sub-routine code which will run when a driver enters the zone.

In some cases, it would also be possible to do exactly the same with a NODE, but you can't define an area as such, just really a line that crosses the track or layout. The Finish line is a Node that has a sub-routine that runs when you finish the lap/race (e.g. give time and/or position, etc). Nodes are also used to give Split/Sector times.

Lines and objects can be placed at the Zone or Node to help define the place bit better than just an anonymous piece of track or off-track area.

So, to recap;

> define (specify X/Y co-ordinates) the area (zone/node) you want your shop (or whatever) to be on the circuit or layout
> append sub-routine code to run (what's to happen) when driver enters the defined area.

Or to put it another way, think of SatNav - you put in your (ZONE) destination, and when you get there, (SUB_ROUTINE) you get message that you've arrived.

That pretty much helps a lot. Thank-you. Umm, is there a specific code I need to make to get the co-ordinates? I forgot if it's built in LFSLapper. Thanks again. Smile
When you type !zone when Lapper is connected to your LFS server, you will get the coordinates.
If you want to get the current node, you can type: !node
Quote from Yisc[NL] :When you type !zone when Lapper is connected to your LFS server, you will get the coordinates.
If you want to get the current node, you can type: !node

Thank-you very much. Appreciate it Smile

FGED GREDG RDFGDR GSFDG