	LapperFunctions: Adding/removing multiple objects(up to 30 objects)

		/*
		$X = X-Axis position of object
		$Y = X-Axis position of object
		$Z = Z-Axis position of object
		$Flag = Flag of object ( Color,Style, etc)
		$Type = Type/Index of object ( Index number : 175 = pillar)
		$Heading = Heading of object
		*/

			
		$Object_One = "19:-654:3:208:175:64"; #X:Y:Z:Flag:TypeOfObject:Heading
        $Object_Two = "20:-654:3:208:175:64"; #X:Y:Z:Flag:TypeOfObject:Heading
        
        addobject($Object_One,$Object_Two);
        removeobject($Object_One,$Object_Two);
				
	LapperEvent : Get info about the objects you add/remove by autocross editor
	
		$DisplayObjectInfo = -1; #Set -1 to disable this event
		CatchEvent OnObjectInfo($userName,$NumO,$Action,$X,$Y,$Z,$Flags,$Type,$InDex,$Heading) # Player event
			privmsg("^7LayoutAction: ^8".$Action);
			privmsg("^7Number of Objects: ^8".$NumO);
			privmsg("^7X/Y/Z: ^8".$X."/".$Y."/".$Z);
			privmsg("^7Index & Type of Object ^8".$InDex."/".$Type);
			privmsg("^7ObjectFlag ^8".$Flags);
			privmsg("^7Heading of Object ^8".$Heading);
		EndCatchEvent


#####################################################################################
#Example code: This includes Insimcircle detection and Startlight control (AUTOCROSS)
#####################################################################################
<?php 
CatchEvent OnLapperStart()
    
    #X:Y:Z:Flag:Type:Heading
    GlobalVar $GateOpen; $GateOpen = "19:-654:3:208:175:64";
    GlobalVar $GateClosed; $GateClosed = "21:-654:3:5:174:64";
    
EndCatchEvent

CatchEvent OnCrossingChecker($userName,$Flags,$Time,$Object,$UserSpeed,$CircleIndex)
        #Go to YellowLight sub when driving throught the insimcircle with index=25
        IF (($CircleIndex == 25)&&($Flags == 0)) THEN
            YellowLight(); #Goto YellowLight Sub            
        ENDIF
        #Go to Closegate sub to close the gate when driving throught the insimcircle with index=26
        IF (($CircleIndex == 26)&&($Flags == 0)) THEN
            CloseGate( $KeyFlags );            
        ENDIF
EndCatchEvent

Sub YellowLight()
            startlightcontrol(5,149,10,2); #Yellow Startlight, Lightindentifier = 10
            HostDelayedCommand( 2, OpenGate); #Go to Open Gate sub after 2 seconds
EndSub

Sub OpenGate( $KeyFlags )
            globalmsg("Gate is open");
            startlightcontrol(5,149,10,8); #Green Startlight,  Lightindentifier = 10
            removeobject($GateClosed);     #Remove "closed gate" object
            addobject($GateOpen); #GateClose
EndSub

Sub CloseGate( $KeyFlags )
            globalmsg("Gate is closed");
            startlightcontrol(5,149,10,1); #Red Startlight,  Lightindentifier = 10
            removeobject($GateOpen);#Remove "open gate" object 
            addobject($GateClosed); #Add object to simulate a closed gate
EndSub
?>