Hi everyone,
I started with adding a another insimpacket into LFSLapper.
With this packet you can add/remove autocross objects, which you also do in the autocross editor.
But now you can control it by insim. LFSLapper in this case.
Ill show you how far i'm with implementing the packet into lapper.
The Functions/Commands you will use is:
You can add/remove up to 30 object at the same time. The functions will look like this.
The list with type of objects can be found in the attachment
I'm also planning to create a new event for getting Information about an object that is being placed or removed. This event can be turned off.
I started with adding a another insimpacket into LFSLapper.
With this packet you can add/remove autocross objects, which you also do in the autocross editor.
But now you can control it by insim. LFSLapper in this case.
Ill show you how far i'm with implementing the packet into lapper.
The Functions/Commands you will use is:
addobject($X,$Y,$Z,$TypeOfObject,$HeadingOfObject);
removeobject($X,$Y,$Z,$TypeOfObject,$HeadingOfObject);
You can add/remove up to 30 object at the same time. The functions will look like this.
<?php
################################
#Adding objects example
################################
$X = getcurrentplayervar("X");
$Y = getcurrentplayervar("Y");
$Z = getcurrentplayervar("Z");
$TypeOfObject = 128; #type of Object (Long Bump)
$HeadingOfObject = 130;
#Up to 30 objects
addobject($X,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 01
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 02
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 03
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 04
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #etc
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject);
################################
#delete objects example
################################
NOTE: To remove an object you must know the location and type of the object.
$X = getcurrentplayervar("X");
$Y = getcurrentplayervar("Y");
$Z = getcurrentplayervar("Z");
$TypeOfObject = 128; #type of Object (Long Bump)
$HeadingOfObject = 130;
#Up to 30 objects
removeobject($X,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 01
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 02
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 03
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #object 04
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject, #etc
$X=$X+2,$Y,$Z,$TypeOfObject,$HeadingOfObject);
?>
I'm also planning to create a new event for getting Information about an object that is being placed or removed. This event can be turned off.