The online racing simulator
Searching in All forums
(879 results)
Bass-Driver
S3 licensed
Those Turn markers are already grouped: 'All_Markers'. Maybe i should rename it to 'All_TurnMarkers'


Edit:

After some testing with the "Scenery objects" ( $DetectHitObject = "All_Objects").I have noticed that some objects are defined as Scenery Objects or as a normal AutoX objects, like cones for example.

You should get a message from all "AutoX objects" on the track.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Well,what i think, is that LFSLapper cannot find a Username from one of the AI's it crashed. I have add this issue in my Bugfix/Test/ToDo list.

Edit: New testversion ver 7002B:

Add: TrackSide_Objects to objectlist.txt
Change: All_Markers is now renamed to All_TurnMarkers
Fix: LFSLapper crash when hitting a AI car.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
'scenery object' can be added.

I will test if LFSLapper gets data when hitting a Non-moving object on the track.
Bass-Driver
S3 licensed
Hi ,
This tool is very helpfull.

Whould you update this tool with the latest InsimPackets and version?
Bass-Driver
S3 licensed
Update:

Adding the packet is going very well.Thanks to Yisc[NL] for helping me.

This is the event for now that i created in LFSLapper.LPR.

Event OnCarContact($PlayerA,$PlayerB,$PlayerA_Speed,$PlayerB_Speed,$PlayerA_X,$PlayerB_X,$PlayerA_Y,$PlayerB_Y) # Player event
EndEvent

LFSLapper adding ISP_CON (Car Contact) packet
Bass-Driver
S3 licensed
Hi everyone,

I'm currently trying to add the 'CarContact' packet in LFSLapper.
This packet should work in Lapper because the packet is added in InsimVersion 5.

For testing i need someone who i can hit. So that i can check, if i get any data from the packet.

To be sure that i get the right data during tests. I run the app InsimSniffer. Thank you DarkTimes for the helpfull app. I hope he update it to the new InsimVersion.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
its possible. ill add all specific concrete objects to the list

Edit: New version
[Add] 8 new objectstrings(concrete) for '$DetectHitObject'. See doc/ObjectHit.txt for info


Note: previous versions are deleted
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Update:

Fixed: Values of $Object_X and $Object_Y
Update: $TypeOfObject changed to $ObjectType


@ sinanju:
That is how $ObjectFlag works.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
$objectflag // Flag of object

OBH_LAYOUT, //1 // an added object
OBH_CAN_MOVE, //2 // a movable object
OBH_WAS_MOVING, //4 // was moving before this hit
OBH_ON_SPOT //8 // object in original position

Is it nessesary to have that Var? otherwise i delete it.

Edit: I have fixed the value of the $Object_X and $Object_Y.
It displays now a correct value, instead of a high unknown value.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Here's a new TestServer of LFSLapper.

Changes:

ObjectHit Event:

-Added ObjectGroups for OBject Hit detection.
All_Concrete
All_Railings
Banners
SpeedBumps

-Added Header Before Event in LFSLapper.LPR
-Added Z Coordinate
-Removed: 2 Player Vars:
GetCurrentPlayerVar("ObjectContactX") //X position of player
GetCurrentPlayerVar("ObjectContactY") //Y position of player

Misc:
- Add: Textfile in "Doc" Folder with objectstrings for OnObjectCollision event
- Removed: DefaultFiles Directory
- Change: LFSLapper version
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
There are about 192 places for objects ( not all of them are used,because they are spare for objects Swawen will add in the future) but its still a big list.

All_Distmarkers does not incl the Turn Markers.
Turn Markers are All_Markers

Hit a another car is a another Insim Packet , which is not implemented in LFSLapper. I might do this after i finished the Object Hit.

I add those 2 groups you descriped.


Edit: Version Numbers

Good thought about the version numbering of LFSLapper

Dont know if the First number stand for the Insim Version.
Lets say it is.

I change the lapper version to 7.01.

My thoughts about changing LapperVersion number.

-For every codechange they should change the number with +1.
-For each testversion they should add a letter 7.01a
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Thank you for testing.

-About the unitspeed: i havent add the code for displaying MPH. Will do in the next testversion:

-Good one about the Header

-I have download the latest version of LFSlapper, that folder is incl the Defaultfiles directory. Will get rid of it.

-I'm still running on 0.6K , but good to know that it is working.
I have also noticed that the OBH packet is changed ( Z coordinate is added).I gonna add that one aswell.

That means the Event vars will change,
Event will be something like this:
Event OnObjectCollision($userName,$ObjectFlag,$ObjectHitTime,$Object_X,$Object_Y,$Object_Z,$TypeObject) # Player event
EndEvent

I also will make a file inside the Docs folder with the strings for:
$DetectHitObject = "";

I shall also get rid of the next 2 PlayerVars(Because they are the same as X and Y)

#GetCurrentPlayerVar("ObjectContactX") //X position of player
#GetCurrentPlayerVar("ObjectContactY") //Y position of player

What about the list with the detecting object. Is it ok or do i have to add more?
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Here's a LFSLapper Testversion:

Changelog:

-New InsimPacket:OBH ObjectHit (Collision detection between car and object)
[b]-New Events :[/b]

OnObjectCollision (Object hit detection)
OnAcceleration2( Second Acceleration progress)


[b]-New PlayerVars :[/b]

ObjectContactX, //X position of player (dont know if this is usefull X does the same
ObjectContactY, //Y position of player (dont know if this is usefull Y does the same)
ObjectContactSpeed, //Speed of player when hitting a object
ObjectContactHead, //Heading of player when hitting a object
ObjectContactDir, //Direction of player when hitting a object

AccelerationStartSpeed2, // Min value for the acceleration feature relative to user unit km or mph
AccelerationEndSpeed2, // Max value for the acceleration feature relative to user unit km or mph
AccelerationTime2, // Acceleration time achieved from start to end speed


How to enable Object Hit detection:

Between the "" you can add one of the object from the list.
Also you can combine several objects: "All_Tires+White_Post"

$DetectHitObject = "All_Objects";
"" = No Object detection
All_Objects //All Objects
All_Tires //Small+Big Tires
All_Cones //All Type of Cones incl Pointers
All_Markers //All Types of Markers
All_DistMarkers //Distance Markers
All_Post//All Posts (Green/Orange/Red/White)
Green_Post
Orange_Post
Red_Post
White_Post
All_Barriers // All Types of Barriers
Long_Barrier
Red_Barrier
White_Barrier
Bale
KeepSigns
SpeedSigns

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
What about enable objects instead of ignoring them. So it ignores all the objects by default.

Example:
$HitObjects="cones+green_pole"; #Event executes when hitting all cones and the green pole.
Bass-Driver
S3 licensed
I have a whole list with objects. Which i have added now.

i'm also trying to implement a Ignoreobject Variable. So if you do $IgnoreObjects = "Cones"; It will ignore all the cones your hit.

You may test all the objects in my test server.

Edit: Add Ignorelist

This is the IgnoreList so far: ( Event will not be executed)
Its also possible to add several values: seperated by &

$IgnoreObjects = Small_Tires&Big_Tires

All // All objects will be ignored
Small_Tires // All small tires will be ignored
Big_Tires //All big tires will be ignored
Cones//All Cones(normal+pointers) will be ignored

Idea's for the ignorelist? let me know.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Update: This evening i go add a objectlist.
So when you hit a object you will see which object you hit.

Example Sourcecode below:


objectHit = Objects(obh.Index);

private string Objects(int ObjectIndex)
{
string[] Object = new string[192];
Object[0] = "Scenery object";
Object[1] = "";
Object[2] = "";
Object[3] = "";
Object[4] = "Long Chalk Line"; Object[5] = "Short Chalk Line";
Object[6] = "Short Ahead Arrow";Object[7] = "Long Ahead Arrow";
Object[20] = "Red+White Cone";
Object[21] = "Red Cone";
Object[22] = "Striped Code";

return Object[ObjectIndex];
}

Event OnObjectCollision($userName,$ObjectFlag,$ObjectHitTime,$Object_X,$Object_Y,$TypeObject) # Player event
Globalmsg("".getplayervar($userName,"NickName")."^8 hit a ^3".$TypeObject." ^8at ".GetCurrentPlayerVar("ObjectContactSpeed")." km/h");
EndEvent

Bass-Driver
S3 licensed
Well, about "$objectflag,$Time,$XPos,$YPos" .
is explained in the doc i,ve attached.

$userName // $Username
$objectflag // Flag of object
OBH_LAYOUT, //1 // an added object
OBH_CAN_MOVE, //2 // a movable object
OBH_WAS_MOVING, //4 // was moving before this hit
OBH_ON_SPOT //8 // object in original position
$Time //Time you hit the object (Race timer) in milliseconds
$XPos // Object X Coordinate
$YPos // Object Y Coordinate

$XPos,$YPos
If you want to know the coordinates of the object you hit.

The difference between ObjectContactSpeed and InstantSpeed:
The Speed should be the same, but i think there is a delay between the packets

Heading and Direction

Direction = Is in which way you face your car.
For example:
North = 0 degrees
West = 90 degrees
South = 180 degrees
East = 270 degrees

Heading:
When you go north and your car is going sideways.


There is a insim packet that isnt implemented in Lapper. That gives a 2 second penalty when hitting a object.

// If an autocross object is hit (2 second time penalty) this packet is sent :

struct IS_AXO // AutoX Object
{
byte Size; // 4
byte Type; // ISP_AXO
byte ReqI; // 0
byte PLID; // player's unique id
};

There is plenty of stuff todo. I hope i can release the OBject Hit for lapper next week or so.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Small update:

Added a event in LFSLapper.LPR named:

Event OnObjectCollision($userName,$objectflag,$Time,$XPos,$YPos)
EndEvent

@PeterN

Thanks
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
thank you,

Sure will do that.

I have managed to get data from all values inside the OBH packet.
But i'm not sure, if the data is correct.

Could someone take a look??
Bass-Driver
S3 licensed
Sry about that typo LOL. Was a littlebit late yesterday XD

Lapper is running on Version 4.
After i finish the "opject hit" packet. i go try to change the Insimversion in lapper.
LFSLapper ISP_OBH (OBject Hit) packet
Bass-Driver
S3 licensed
After LFSLapper developers Krayy and Gai-Luron left LFS. I'm trying to add some LFS insim packets to LFSLapper.

Atm i'm busy with adding a packet that reports the collision between Car and (AutoX)opjects.
After some strugling with finding out what everything means. I have finally received some data from lapper when hitting an opject.

Be aware: i'm not a programmer, and i have 0% knowledge of C# programming.
So thank you google for helping me out LOL
Last edited by Bass-Driver, . Reason : typo
Bass-Driver
S3 licensed
@ mikail346

Here is something we have told you before.

Quote from Bass-Driver :There are enough scripts/examples on this forum to work with.

Quote from sinanju :Next to making up your own buttons/labels, CASE commands are almost next easiest thing to do in lapper - there are already lots of examples in the main lfslapper.lpr file, along with almost every other lapper add-on on this forum.

Surely you can work out the obvious?

@ Yisc[NL]: sry to spam your thread with nonsense. apparently some people cannot read/understand what we are saying.
Bass-Driver
S3 licensed
Hacking,crashing cannot be turned off by lapper.
However Speedhacks ( tweaks or whatever) can be detected,by building a script that checks the speed.

if speed > 200 then
#do something
endif

At the moment i'm thinking about those detections.
-Speeddetection for each car
and
-Accelerationdetection for each car.

I already have a sort of global crash/acceleration protection.

Event OnAcceleration( $userName ) # Player event
IF(GetCurrentPlayerVar("AccelerationTime") <= "1.4")THEN
cmdLFS( "/spec " . $userName);
privMsg("^3>^7You accelerated faster than 1.4 Sec to 100km/h!");
ENDIF
EndEvent

Bass-Driver
S3 licensed
oke thanks.

Anyway, i go back to 1 lapper per server. Otherwise i have to change the code of several systems.
For example i'm updating my adminpanel. The logfiles are not stored in the database. Here's a picture of it. It works good and as admin you have a sort of control over your admins/server.
Bass-Driver
S3 licensed
hi,


When you have multiple servers running on one LFSLapper.exe
Is it possible to get data from the servers like Host/ Number of players etc.

i know the function: groupcmdlfs(); but i only can send messages to the servers.
FGED GREDG RDFGDR GSFDG