/*
LENS-FLARE(S) 2013 by priest

STEUERUNG: pan & tilt mit der maus (rauf & runter mit den maustasten). w;a;s;d = bewegung

manchmal braucht man mehr als eine lichtquelle mit lens-flares. 
ausserdem, auch ein cooler effekt, lens-dust-effekte (keine ahnung wie der genaue begriff dafür lautet...). wenn man direkt in die lichtquelle guckt sieht man, in 
gewissen fällen, wie staub oder dreck auf der linse sichtbar wird. es gibt bestimmt noch eine bessere lösung dafür lens-dust-fx zu erstellen, denn JEDE lichtquelle 
generiert hier SEINE eigenen dust-flares (125 total / lichtquelle), dafür kann jede einzelne lichtquelle den alphawert + farbe seiner flares unabhängig kontrollieren, 
wenn mal mehrere lichtquellen in der umgebung leuchten. [farbe & alphawert]
die action LF_sun benützt noch die (sogenannte) "traditionelle" version, mit den typischen view_entitys die man vordefinieren muss. 
(siehe "//LENS FLARES FÜR DIE SONNE #########################")
die anderen leuchtquellen hingegen, benützen eine "alternative" methode, lensflares werden geladen, wenn man in reichweite kommt.(oder mittels einem TRIGGER/schalter)
diese werden dann, bei einer geissen entfernung zur lichtquelle eliminiert.
falls mehrere lichtquellen die gleichen flares benötigten musste man, mit der "traditionellen" methode, 1000de von view_entitys vordefinieren lassen, bsp: 20 lichtquellen
à 20 lensflares = 400 view_entitys...
siehe nun alternativ bsp: "action lights_POITR_INDX_1" = 4 lichtquellen, 4 unterschiedliche lichtfarben, 10 lensflares à lichtquelle und alle 4 benützen die gleichen
funktionen. (eine initial-funktion/kreieren, eine alpha kontrolle/regulierung, einige auch einen alpha fadeout, einige auch eine spezial effekt-funktion und zuletzt eine 
remove/eliminier-funktion). diese funktionieren alle mit handle(s) und einem einzigen pointer.
nun, ich bin kein profi und hab sicher viel käse geschrieben, aber vielleicht kann ja jemand dieses 'zeug' hier gut gebrauchen. 

alles ist frei und kann privat oder kommerziell genutzt werden. ich nehme keine verantwortung für die ganzen sachen, weder für schäden noch für aliens angriffe...
verkaufen, oder vermieten der bilder ist nicht erlaubt. 
bedenke, dass diese bilder (eventuell) auch andere personen in ihren projekten nutzen werden, vielleicht möchtest/könntest du diese ja leicht ändern?!? 
ich hab noch ein paar photoshop beispiele beigelegt, damit du sehen kannst, wie ich diese bilder gebaut habe. aber du findest garantiert eine bessere lösung. 
viel vergnügen mit den lens-flares...
---------------------------------------------------------------------------

ENGLISH * * * (sorry for my bad english...)

STEERING: pan & tilt with the mouse (up/down mousekeys). w;a;s;d = move camera

sometimes you need more than one lens-flare.
a cool effect too: lens-dust-effects. (don't know the exact name for it...) . if you look directly in a lightsource you can see, in some cases, dust and dirt particles
become visible on the camera lens. of course there is allways a better way to programm this effect, all because any lightsource need to create their own dust-flares 
(a lot of flares, 125 total / lightsource!). but on this way any lightsource can now control the alpha & the color value of their own dust-flares independently to the 
other lightsource that shines nearby.
the action LF_sun is using the "traditional" way to show lens-flares with the typical view_entitys. see "//LENS FLARES FÜR DIE SONNE #########################"
the other lightsources use an alternative method to create lens-flares. they can be loaded and removed if you go closer/go away from the lightsource (or also with a 
switch/trigger possible). if you have several lightsources that are using the same lens-flares you need 1000.. of view_ents (with the traditional method) example: 20 
lightsources with 20 flares = 400 view_ents.
now take a look to the alternative method "action lights_POITR_INDX_1", 4 different lightsource & lightcolors, 10 lens-flares and all of them use the same 
functions, (an initial function/creation, an alpha controll/regulation, or alpha fadeout-function, other lightsource are using a special effect-function, and at last a 
remove-function) they work all with handles and only one pointer.
well, i am not a pro, but maybe someone can use this stuff...
all is free and you can use them privately or commercially. i don't take any responsibility for all this, not for damages or aliens invasions...
sell or rent the pictures (targa pics) are not permit. but if you want, you can change them a little bit.
i have placed some photoshop examples so you can see how i made some of the flares. but i am shure you will make better ones.
have fun with the lens-flares...
*/


var video_mode = 11;	 var video_depth = 32; var video_screen=1;//VORSICHT video_mode!: änderst du den wert MUSS man auch die positionen der lens-dust
//flares ändern! siehe LF_pointer.LF_axisRL = xxx; LF_pointer.LF_axisUD = xxx; und auch deren scale werte ab den funktionen Init_DIRT1(LF_number)!
//um herauszufinden wo der screen limit für diese flares liegt, aktiviere folgende angabe in der function "AlphaCont_DIRT1(LF_number)" ein: a= my.skill60; b= my.skill61;
//starte das programm, beweg dich zu einer lichtquelle mit lens-dust-effekten (bsp: action lights_POITR_INDX_3 "sonne2") drehe mit der kamera umher um die a-b werte zu 
//ermitteln. dann änderst du folgende angaben aller dust-flares: "LF_pointer.LF_axisRL = xxx; LF_pointer.LF_axisUD = yyy;" (wobei xxx & yyy die neuen koordinaten sind)
//dann MUSST du aber auch folgende werte ändern: if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0). statt werte könntest du
//eine variabel setzen (bsp: max_screenSIZE_X = 1600;min_screenSIZE_X = 0; max_screenSIZE_Y = 1200;min_screenSIZE_Y = 0;) die dann, je nach video_mode andere daten 
//aufweisen werden!!! BSP: if (video_mode == 11) {max_screenSIZE_X = 1600;min_screenSIZE_X = 0; max_screenSIZE_Y = 1200;min_screenSIZE_Y = 0;}
//dann muss man noch in den einzelnen actions, die dust-flares benützen: [siehe: "my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;"] folgendes ersetzen: 
//my.skill60 = my.skill70+(max_screenSIZE_X/2);my.skill61 = my.skill71+(max_screenSIZE_Y/2);   
//[vergiss nicht das PANEL "info_pan" zu aktivieren, bzw. zu "unkommentieren" um die test variablen a & b sehen zu können.]

/*
watch out for the video_mode! if you change this value, you have to change the position and the scale of all lens-dust-flares! (see for LF_pointer.LF_axisRL = xxx; 
LF_pointer.LF_axisUD = xxx;) in the function Init_DIRT1(LF_number).
to find out where the limit of the screen lays, you can use "a= my.skill60; b= my.skill61;" in the function AlphaCont_DIRT1(LF_number) [and don't forget to uncomment the 
PANEL info_pan to see the test variables a & b!]. start the programm go the lightsource named "sonne2" (the action lights_POITR_INDX_3) turn arround with the camera 
left/right to see the a and b value. now rewrite the new datas in the "LF_pointer.LF_axisRL = xxx; LF_pointer.LF_axisUD = yyy;" (xxx & yyy are the coordinates you have 
to change)
then you have to change this too: "if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)" dependent of the video_mode. example: 
if (video_mode == 11) {max_screenSIZE_X = 1600;min_screenSIZE_X = 0; max_screenSIZE_Y = 1200;min_screenSIZE_Y = 0;} why not using a variable like this in all the 
functions starting with Init_DIRT1(LF_number): 
if (my.skill60 < max_screenSIZE_X && my.skill60 > min_screenSIZE_X && my.skill61 < max_screenSIZE_Y && my.skill61 > min_screenSIZE_Y)
and then for the dust-flares: "my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;" change them to: "my.skill60 = my.skill70+(max_screenSIZE_X/2);
my.skill61 = my.skill71+(max_screenSIZE_Y/2);"
*/



string level_str = <lensFlares.WMB>;
var event_TRG;var sun_start;var leuchtreklameCOUNTER;var CA=110;

//diese defines kann man benützen damit die generierten flares werte speichern und diese dann nicht zulasten der actions und deren skills gehen. (bei 1000 lens flares...)
//use this "defines" to save some values on the created flares, so you d'not charge the skills of the actions. (think about 1000 flares...)
define LF_pivot_dist,skill1;define LF_axisRL,skill2;define LF_axisUD,skill3;define LF_maxALPHA,skill4;define LF_temp1,skill5;define LF_temp2,skill6;
define LF_temp3,skill7;define LF_axPIVrl,skill8;define LF_axPIVud,skill9;

var LF_indx[50];//speichere 50 handles in diesem array. siehe action lights_POITR_INDX_1. SAVE 50 HANDLES ON THIS ARRAY, should suffice?!
var LF_indxB[50];var LF_indxC[50];//für 10 flares à lichtquelle und jetzt könnten (theoretisch) 50 lichtquellen ihre lensflares nutzen. sollte reichen, oder?
var LF_indxD[50];var LF_indxE[50];var LF_indxF[50];var LF_indxG[50];var LF_indxH[50];var LF_indxI[50];var LF_indxJ[50];var LF_indxK[10];var LF_indxL[10];
var LF_indxM[10];var LF_indxN[10];var LF_indxO[10];var LF_indxP[10];var LF_indxQ[10];var LF_indxR[10];var LF_indxS[10];var LF_indxT[10];var LF_indxU[10];
var LF_indxV[10];var LF_indxW[10];var LF_indxX[10];var LF_indxY[10];var LF_indxZ[10];var LF_indxDust[100];

//arrays für die lens-dust-flares * * * * * * * * * *
var LF_indxDIRT1[50];var LF_indxDIRT2[50];var LF_indxDIRT3[50];var LF_indxDIRT4[50];var LF_indxDIRT5[50];var LF_indxDIRT6[50];var LF_indxDIRT7[50];var LF_indxDIRT8[50];
var LF_indxDIRT9[50];var LF_indxDIRT10[50];var LF_indxDIRT11[50];var LF_indxDIRT12[50];var LF_indxDIRT13[50];var LF_indxDIRT14[50];var LF_indxDIRT15[50];
var LF_indxDIRT16[50];var LF_indxDIRT17[50];var LF_indxDIRT18[50];var LF_indxDIRT19[50];var LF_indxDIRT20[50];var LF_indxDIRT21[50];var LF_indxDIRT22[50];
var LF_indxDIRT23[50];var LF_indxDIRT24[50];var LF_indxDIRT25[50];var LF_indxDIRT26[50];var LF_indxDIRT27[50];var LF_indxDIRT28[50];var LF_indxDIRT29[50];
var LF_indxDIRT30[50];var LF_indxDIRT31[50];var LF_indxDIRT32[50];var LF_indxDIRT33[50];var LF_indxDIRT34[50];var LF_indxDIRT35[50];var LF_indxDIRT36[50];
var LF_indxDIRT37[50];var LF_indxDIRT38[50];var LF_indxDIRT39[50];var LF_indxDIRT40[50];var LF_indxDIRT41[50];var LF_indxDIRT42[50];var LF_indxDIRT43[50];
var LF_indxDIRT44[50];var LF_indxDIRT45[50];var LF_indxDIRT46[50];var LF_indxDIRT47[50];var LF_indxDIRT48[50];var LF_indxDIRT49[50];var LF_indxDIRT50[50];
var LF_indxDIRT51[50];var LF_indxDIRT52[50];var LF_indxDIRT53[50];var LF_indxDIRT54[50];var LF_indxDIRT55[50];var LF_indxDIRT56[50];var LF_indxDIRT57[50];
var LF_indxDIRT58[50];var LF_indxDIRT59[50];var LF_indxDIRT60[50];var LF_indxDIRT61[50];var LF_indxDIRT62[50];var LF_indxDIRT63[50];var LF_indxDIRT64[50];
var LF_indxDIRT65[50];var LF_indxDIRT66[50];var LF_indxDIRT67[50];var LF_indxDIRT68[50];var LF_indxDIRT69[50];var LF_indxDIRT70[50];var LF_indxDIRT71[50];
var LF_indxDIRT72[50];var LF_indxDIRT73[50];var LF_indxDIRT74[50];var LF_indxDIRT75[50];var LF_indxDIRT76[50];var LF_indxDIRT77[50];var LF_indxDIRT78[50];
var LF_indxDIRT79[50];var LF_indxDIRT80[50];var LF_indxDIRT81[50];var LF_indxDIRT82[50];var LF_indxDIRT83[50];var LF_indxDIRT84[50];var LF_indxDIRT85[50];
var LF_indxDIRT86[50];var LF_indxDIRT87[50];var LF_indxDIRT88[50];var LF_indxDIRT89[50];var LF_indxDIRT90[50];var LF_indxDIRT91[50];var LF_indxDIRT92[50];
var LF_indxDIRT93[50];var LF_indxDIRT94[50];var LF_indxDIRT95[50];var LF_indxDIRT96[50];var LF_indxDIRT97[50];var LF_indxDIRT98[50];var LF_indxDIRT99[50];
var LF_indxDIRT100[50];var LF_indxDIRT101[50];var LF_indxDIRT102[50];var LF_indxDIRT103[50];var LF_indxDIRT104[50];var LF_indxDIRT105[50];var LF_indxDIRT106[50];
var LF_indxDIRT107[50];var LF_indxDIRT108[50];var LF_indxDIRT109[50];var LF_indxDIRT110[50];var LF_indxDIRT111[50];var LF_indxDIRT112[50];var LF_indxDIRT113[50];
var LF_indxDIRT114[50];var LF_indxDIRT115[50];var LF_indxDIRT116[50];var LF_indxDIRT117[50];var LF_indxDIRT118[50];var LF_indxDIRT119[50];var LF_indxDIRT120[50];
var LF_indxDIRT121[50];var LF_indxDIRT122[50];var LF_indxDIRT123[50];var LF_indxDIRT124[50];var LF_indxDIRT125[50];//total 125 dust-flares

entity* LF_pointer;//es braucht eigentlich nur ein pointer (name) um unendlich viele lens flares zu generieren. dafür BENÖTIGT man mehr arrays um die handels zu
//speichern. brauchen 1000 lichtquellen dieselben 10 lens-flares muss man also nur 10 arrays bereitstellen. 
//you need only one pointer but a lot more arrays for any created flare. if 1000 lightsources creates the same identical 10 lens-flares you will need only 10 arrays.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//benütze diesen display für test angaben und werte anzeige. DISPLAY FOR TEST PURPOSES
/*
font comic_font, <comic20.pcx>, 34, 38;
var a; var b;var c;var d; var e; var f; var g; var h;
PANEL info_pan
{
	POS_X   10;	POS_Y   10; 
	digits 0,0,4.3,comic_font,1,a;
	digits 0,40,4.3,comic_font,1,b;
	digits 0,80,4.3,comic_font,1,c;
	digits 0,120,4.3,comic_font,1,d;
	digits 0,160,4.3,comic_font,1,e;
	digits 0,200,4.3,comic_font,1,f;
	digits 0,240,4.3,comic_font,1,g;
	digits 0,280,4.3,comic_font,1,h;
	layer = 100;
	FLAGS = REFRESH,VISIBLE;      	
}
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALPHA KANAL IN BILDERN: baue in photoshop lens flares: wähle danach das gesamte bild aus mit "auswahl/alles auswählen" speichere die auswahl: "auswahl speichern..."
//lade sie danach mit: "auswahl laden..." und "umkehren" + "schnittmenge bilden". speichere alles unter targa 32 bit! (photoshop elements 5)
//PS: USE ONLY TARGA PICTURES 32 BIT!
//----------------------------------------------------------------------
//LENS FLARES FÜR DIE SONNE ######################### (""traditionelle version"")
ENTITY LF_SUN_1a
{
	type = <LF_sunA.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1;	scale_x = 2;	scale_y = 2;
}
ENTITY LF_SUN_1b
{
	type = <LF_sunA.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1;	scale_x = 2.3;	scale_y = 2.3;
}
ENTITY LF_SUN_2
{
	type = <LF_sunC.tga>;	view = CAMERA; 	layer = 10;	LF_pivot_dist = 1;	scale_x = 13;	scale_y = 13;
}
ENTITY LF_SUN_3
{
	type = <LF_sunD.tga>;	view = CAMERA; 	layer = 2;	LF_pivot_dist = 0.96;	scale_x = 1;	scale_y = 1;
}
ENTITY LF_SUN_4
{
	type = <LF_sunE.tga>;	view = CAMERA; 	layer = 2;	LF_pivot_dist = 0.92;	scale_x = 1;	scale_y = 1;
}
ENTITY LF_SUN_5
{	//LF_axPIVrl: bewege zusätzlich auf einer achse. 		MOVE ON ONE AXIS right/left TOO
	type = <LF_sunF.tga>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = 0.92; LF_axPIVrl = 0.5;
}
ENTITY LF_SUN_6
{
	type = <LF_sunF.tga>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = 0.92; LF_axPIVrl = -0.5;
}
ENTITY LF_SUN_7
{	
	type = <LF_sunF.tga>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = 0.89; LF_axPIVrl = 1.1;scale_x = 2;	scale_y = 0.7;
}
ENTITY LF_SUN_8
{
	type = <LF_sunF.tga>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = 0.89; LF_axPIVrl = -1.1;scale_x = 2;	scale_y = 0.7;
}
ENTITY LF_SUN_9
{
	type = <LF_sunG.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1; 
}
ENTITY LF_SUN_10
{
	type = <LF_sunH.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1.08; LF_axPIVrl = -1.1; LF_axPIVud = -1.1;
}
ENTITY LF_SUN_11
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1.2; scale_x = 1.2;	scale_y = 1.2;
}
ENTITY LF_SUN_12
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 1.35; scale_x = 3.6;	scale_y = 3.6;
}
ENTITY LF_SUN_13
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 0.76; scale_x = 0.6;	scale_y = 0.6;
}
ENTITY LF_SUN_14
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 0.55; scale_x = 0.2;	scale_y = 0.2;
}
ENTITY LF_SUN_15
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 0.33; scale_x = 0.8;	scale_y = 0.8;
}
ENTITY LF_SUN_16
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 0.2; scale_x = 0.1;	scale_y = 0.1;
}
ENTITY LF_SUN_17
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = 0.05; scale_x = 2;	scale_y = 2;
}
ENTITY LF_SUN_18
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 2;	LF_pivot_dist = 0.01; scale_x = 1;	scale_y = 1;
}
ENTITY LF_SUN_19
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 1;	LF_pivot_dist = -0.5; scale_x = 2;	scale_y = 2;
}
ENTITY LF_SUN_20
{
	type = <LF_sunI.tga>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = -1; scale_x = 7;	scale_y = 7;
}
ENTITY LF_SUN_21
{//die letzten view-entitys sind nicht targa bilder sondern entitys. mit denen kann man noch zusätzliche effekte, wie skin manipulation, vornehmen. sieht cool aus
//the last two view-entitys are model-entitys and not targa pictures. you can manipulate the skin and it looks cool.
	type = <lf_ent_spz.mdl>;	view = CAMERA; 	layer = 4;	LF_pivot_dist = -1.35; scale_x = 0;	scale_y = 25; scale_z = 25;
}
ENTITY LF_SUN_22
{
	type = <lf_ent_spz.mdl>;	view = CAMERA; 	layer = 3;	LF_pivot_dist = -0.85; scale_x = 0;	scale_y = 3; scale_z = 3;
}
//-----------------------------------------------------------------------------------------------------------------------------



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function main()
{
	level_load(level_str);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function LF_Place(rapunzel, posi_)//bezeichnung: posi_ (zufälliges wort) muss nicht vorher definiert werden in einer var! die werte kommen von der jeweiligen action..
{//..die diese funktion ausgelöst hat bsp: LF_Place(LF_SUN_1a, vector(my.skill70,my.skill71,my.skill72)); wobei skill70-72 die positionsangabe der action ist
//"posi_" (a coincidental word) you don't have to define this keyword with a variable. the value come from the respective actions that triggered this function here. 
//example: LF_Place(LF_SUN_1a, vector(my.skill70,my.skill71,my.skill72)); the skill70-72 are the positions value of the respective action

	my = rapunzel;
	vec_set(my.LF_axisRL, posi_); my.visible = on;my.transparent = on; my.bright = on;	my.flare = on; my.ambient = 100;my.albedo=-100;
	my.x = my.LF_axisRL*my.LF_pivot_dist + 0.5*screen_size.x;// multiply the pixel deviation with the pivot factor,	
	my.y = my.LF_axisUD*my.LF_pivot_dist + 0.5*screen_size.y;// and add the screen center. LF_pivot_dist = 1 > place the flare in the middle of the lightsource	
	//der LF_pivot_dist versetzt die lensflares entweder oberhalb der leuchtquelle, oder unterhalb wenn man dann die kamera schwenkt. 1 = bleib immer in der mitte der 
   //leuchtquelle.
	my.z = 750;	rel_for_screen(my.x,camera);
}
function LF_PlaceX(miau, juhui_)//diese lens flares bewegen sich AUCH auf der x-achse. THIS LENS-FLARE MOVE ON THE X-AXIS TOO
{	//LF_axisRL ist der skill2 wert, dieser view entity. wir haben diese oben bereits definiert. setzt man "my.skill2" wird sie hier nicht verstanden, error!
	//LF_axisRL kann man einsetzen um eine zusätzliche bewegung zu machen (ausser LF_pivot_dist) in abhängigkeit der drehung der kamera zur lichtquelle
	//LF_axisRL is the skill2 value from this created view-(layer)-entity. if you put "my.skill2" instead in this place, you will get an error! therefore we need defines.
	//you can use LF_axisRL to move the flare additionaly to move it on x-axis too, if you turn the camera arround.
	
	my = miau;
	vec_set(my.LF_axisRL, juhui_);	my.visible = on;my.transparent = on; my.bright = on;	my.flare = on; my.ambient = 100;my.albedo=-100;
	my.x = my.LF_axisRL * my.LF_pivot_dist + 0.5*screen_size.x + (my.LF_axisRL*my.LF_axPIVrl);	my.y = my.LF_axisUD*my.LF_pivot_dist + 0.5*screen_size.y;
	my.z = 750;	rel_for_screen(my.x,camera);
}
function LF_PlaceXY(kuh, susi)//diese lens flares bewegen sich auf x & y -achse. dabei könnte man einer der werte, zur laufzeit, leicht verändern um neue effekte zu 
{	//erzielen.
//this flares will move on x and y axis. if you change the value by the time, you can obtain an interesting effect. 
	my = kuh;
	vec_set(my.LF_axisRL, susi); my.visible = on;my.transparent = on; my.bright = on;	my.flare = on; my.ambient = 100;my.albedo=-100;
	my.x = my.LF_axisRL * my.LF_pivot_dist + 0.5*screen_size.x + (my.LF_axisRL*my.LF_axPIVrl);	
	my.y = my.LF_axisUD*my.LF_pivot_dist + 0.5*screen_size.y  + (my.LF_axisUD*my.LF_axPIVud);
	my.z = 750;	rel_for_screen(my.x,camera);
}
function LF_PlaceDIRT(dusty)//für die "lens-dust-effekte". die view entitys bleiben an ort und stelle, bewegen sich nicht mit den lensflares. sie zeigen sich nur, wenn 
{//die lichtquelle (der action) sich der dust-flare position "nähert".
//this functions are for the dust-flares. in contrast with the normal lensflares they will remain on their placed position, (LF_pointer.LF_axisRL & LF_pointer.LF_axisUD)
//only tha alpha will change as the lightsource moves on their position, they will "light" up
	my = dusty; my.visible = on;my.transparent = on; my.bright = on;	my.flare = on; my.ambient = 100;my.albedo=-100;
	my.x = my.LF_axisRL;	my.y = my.LF_axisUD;	my.z = 750;	rel_for_screen(my.x,camera);
}
///*************************************************************************************************************************************
///*************************************************************************************************************************************
///*************************************************************************************************************************************


//"lens-dust-effekte" * * *  (VORSICHT mit dem nexus! event. erhöhen lassen)      [MAYBE YOU HAVE TO INCREASE THE NEXUS!]
//LF_dirtA.tga = mehrere, grössere aber dafür leicht sichtbare flecken
function Init_DIRT1(LF_number)
{//initialisierung...wird nur am anfang gebraucht beim generieren des flares, dann nicht mehr ansprechen
//initialization...will be used only as a startup, at the beginning
	LF_pointer = ptr_for_handle(LF_indxDIRT1[LF_number]);//Weist das durch dem gegebenen Handle zugeordnete Objekt einem Pointer zu. 
   LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);//kreiere layer (flare).   CREATE THE FLARE
   LF_indxDIRT1[my.skill8] = handle(LF_pointer);//speichere diesen layer auf dem handle mit der einmaligen id der action (skill8, gib diese vorher im WED ein!)
   //PS: keine doppelte id's im WED eingeben, also jede lichtquelle hat seine eigene nummer, sonst entstehen empty pointer fehlermeldungen!!!
   //save this layer on a handle with an unique id number (skill8 of the action, put it on WED) any lightsource MUST have his own and unique id, > "empty pointer" error
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));LF_pointer.roll = 90;//setze nun ein paar daten, sowie auch die scale oder die farbe des flares 
   //falls diese farben im laufe des spiels, statisch bleiben, sich nicht verändern werden! (sonst in einer zusätzlichen funktion ändern lassen SpecialFX_.....)
   //now you can put some datas like scale or the colour of the created flare. if the colour should change by the time you can use an additional function.
   LF_pointer.alpha = 0;//setze anfangs alpha werte auf 0!   INITIAL ALPHA VALUE ON 0
}
function AlphaCont_DIRT1(LF_number)
{	
	//a= my.skill60; b= my.skill61;zu testzwecken			FOR TEST PURPOSE  (SCREEN LIMIT CHECK)
   LF_pointer = ptr_for_handle(LF_indxDIRT1[LF_number]);
   LF_pointer.LF_axisRL = 50; LF_pointer.LF_axisUD = 80;LF_PlaceDIRT(LF_pointer);//falls camera.arc ändert wäre es besser, die position der dustflares hier ständig zu 
   //aktualisieren, also diese angaben hier zu stellen statt in die "init"-funktion (auch scalewert)
   //if the arc value of the camera changes then its better to place position and scale value here, in this function and not in the initial-function to update the value.
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);
   //Begrenze die sichtbare zone. erhelle mich (alpha) wenn lichtquelle meine position erreicht
   //limit the visible zone. (1600 & 1200 screen limits) if the lightsource is close to my position then my alpha will be amplified...
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
	//der alphawert hängt auch von der distanz ab (bei distanzaktiven lichtquellen) und auch von kamera-aussersicht und hindernissen
	//...of course the distance of the lightsource and off-screen of the camera makes a difference for my alpha value too.
}
function Remove_DIRT1(LF_number)
{	//eliminiere flares die ausserhalb der reichweite der lichtquelle sind (speicherplatz sparen). 		ELIMINATE the flare
   LF_pointer = ptr_for_handle(LF_indxDIRT1[LF_number]);   ent_remove(LF_pointer); 
}
function Init_DIRT2(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT2[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT2[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -30; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT2[LF_number]);
   LF_pointer.LF_axisRL = 300; LF_pointer.LF_axisUD = 30;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 0.8*(camera.arc/CA);  
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT2(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT2[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT3(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT3[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT3[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = -155;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT3[LF_number]);
   LF_pointer.LF_axisRL = 600; LF_pointer.LF_axisUD = 100;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT3(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT3[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT4[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT4[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = -155; LF_pointer.alpha = 0;
}
function AlphaCont_DIRT4(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT4[LF_number]);
   LF_pointer.LF_axisRL = 800; LF_pointer.LF_axisUD = 70;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT4(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT4[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT5[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT5[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = 103;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT5[LF_number]);
   LF_pointer.LF_axisRL = 1050; LF_pointer.LF_axisUD = 120;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT5(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT5[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT6[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT6[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = -205; LF_pointer.alpha = 0;
}
function AlphaCont_DIRT6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT6[LF_number]);
   LF_pointer.LF_axisRL = 1150; LF_pointer.LF_axisUD = 50;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 0.8*(camera.arc/CA);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT6[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT7(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT7[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT7[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = 175;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT7(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT7[LF_number]);
   LF_pointer.LF_axisRL = 1335; LF_pointer.LF_axisUD = 25;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT7(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT7[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT8(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT8[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT8[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = -13;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT8(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT8[LF_number]);
   LF_pointer.LF_axisRL = 1520; LF_pointer.LF_axisUD = 70;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT8(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT8[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT9(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT9[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT9[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = 213;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT9(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT9[LF_number]);
   LF_pointer.LF_axisRL = 50; LF_pointer.LF_axisUD = 190;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT9(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT9[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT10(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT10[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT10[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.roll = 77;LF_pointer.alpha = 0;
}
function AlphaCont_DIRT10(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT10[LF_number]);
   LF_pointer.LF_axisRL = 200; LF_pointer.LF_axisUD = 125;LF_PlaceDIRT(LF_pointer);LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT10(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT10[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT11(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT11[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT11[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -288;      vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT11(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT11[LF_number]);
   LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 0.8*(camera.arc/CA);LF_pointer.LF_axisRL = 450; LF_pointer.LF_axisUD = 180;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT11(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT11[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT12(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT12[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT12[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -79; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT12(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT12[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 720; LF_pointer.LF_axisUD = 200;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT12(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT12[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT13(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT13[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT13[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -133; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT13(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT13[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 930; LF_pointer.LF_axisUD = 180;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT13(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT13[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT14(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT14[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT14[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -273;  vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT14(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT14[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 580; LF_pointer.LF_axisUD = 310;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT14(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT14[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT15(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT15[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT15[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 305;vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT15(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT15[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1280; LF_pointer.LF_axisUD = 220;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT15(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT15[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT16(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT16[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT16[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -222; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT16(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT16[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1480; LF_pointer.LF_axisUD = 250;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT16(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT16[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT17(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT17[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT17[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 333; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT17(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT17[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 140; LF_pointer.LF_axisUD = 300;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT17(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT17[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT18(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT18[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT18[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 128; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT18(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT18[LF_number]);
   LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 0.8*(camera.arc/CA);LF_pointer.LF_axisRL = 320; LF_pointer.LF_axisUD = 350;LF_PlaceDIRT(LF_pointer);  
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT18(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT18[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT19(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT19[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT19[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -55; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT19(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT19[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 840; LF_pointer.LF_axisUD = 280;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT19(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT19[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT20(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT20[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT20[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 248; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT20(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT20[LF_number]);
   LF_pointer.scale_x = 0.8*(camera.arc/CA);LF_pointer.scale_y = 0.8*(camera.arc/CA);LF_pointer.LF_axisRL = 1100; LF_pointer.LF_axisUD = 310;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT20(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT20[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT21(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT21[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT21[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -188;vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT21(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT21[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1380; LF_pointer.LF_axisUD = 330;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT21(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT21[LF_number]);   ent_remove(LF_pointer); }
						//LF_dirtB.tga runde kreise. * * * * *
function Init_DIRT22(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT22[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);  LF_indxDIRT22[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT22(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT22[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 50; LF_pointer.LF_axisUD = 130;	LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT22(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT22[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT23(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT23[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT23[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT23(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT23[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1220; LF_pointer.LF_axisUD = 360;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT23(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT23[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT24(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT24[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT24[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT24(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT24[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 630; LF_pointer.LF_axisUD = 330;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT24(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT24[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT25(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT25[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT25[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT25(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT25[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 1590; LF_pointer.LF_axisUD = 1000;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT25(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT25[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT26(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT26[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT26[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT26(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT26[LF_number]);
   LF_pointer.scale_x = 0.5*(camera.arc/CA);LF_pointer.scale_y = 0.5*(camera.arc/CA);LF_pointer.LF_axisRL = 888; LF_pointer.LF_axisUD = 210; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT26(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT26[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT27(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT27[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT27[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT27(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT27[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 120; LF_pointer.LF_axisUD = 950;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT27(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT27[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT28(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT28[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT28[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT28(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT28[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 350; LF_pointer.LF_axisUD = 1000;	 LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT28(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT28[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT29(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT29[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT29[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT29(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT29[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1145; LF_pointer.LF_axisUD = 825;	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT29(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT29[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT30(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT30[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT30[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT30(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT30[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1390; LF_pointer.LF_axisUD = 10;  LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT30(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT30[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT31(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT31[LF_number]);  LF_pointer = ent_createlayer("LF_dirtB.tga",0,10);   LF_indxDIRT31[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT31(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT31[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 750; LF_pointer.LF_axisUD = 1100;  LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT31(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT31[LF_number]);   ent_remove(LF_pointer); }
											//LF_dirtC.tga = mittelgrösse flecken * * * * *
function Init_DIRT32(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT32[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT32[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT32(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT32[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 200; LF_pointer.LF_axisUD = 20;  LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT32(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT32[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT33(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT33[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT33[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 172; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT33(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT33[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 450; LF_pointer.LF_axisUD = 30;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT33(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT33[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT34(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT34[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT34[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -69;vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT34(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT34[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 955; LF_pointer.LF_axisUD = 20;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT34(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT34[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT35(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT35[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT35[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 248; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT35(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT35[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1400; LF_pointer.LF_axisUD = 150;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT35(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT35[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT36(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT36[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT36[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -144;vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT36(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT36[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 300; LF_pointer.LF_axisUD = 200;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT36(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT36[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT37(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT37[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT37[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = 315; vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT37(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT37[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1150; LF_pointer.LF_axisUD = 210;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT37(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT37[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT38(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT38[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT38[my.skill8] = handle(LF_pointer);
   LF_pointer.roll = -351;vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT38(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT38[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1580; LF_pointer.LF_axisUD = 390;LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT38(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT38[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT39(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT39[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT39[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT39(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT39[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 30; LF_pointer.LF_axisUD = 400;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT39(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT39[LF_number]);   ent_remove(LF_pointer); }
										//daumenabdruck/thumbprint sieht auch cool aus * * * * *
function Init_DIRT40(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT40[LF_number]);  LF_pointer = ent_createlayer("LF_dirtD.tga",0,10);   LF_indxDIRT40[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT40(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT40[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1400; LF_pointer.LF_axisUD = 1140;     LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT40(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT40[LF_number]);   ent_remove(LF_pointer); }
										//LF_dirtE.tga = kleine, durchsichtigere runde flecken * * * * *
function Init_DIRT41(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT41[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT41[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT41(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT41[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 400; LF_pointer.LF_axisUD = 90;      	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT41(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT41[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT42(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT42[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT42[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT42(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT42[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 680; LF_pointer.LF_axisUD = 30;     	LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT42(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT42[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT43(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT43[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT43[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT43(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT43[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1240; LF_pointer.LF_axisUD = 120;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT43(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT43[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT44(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT44[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT44[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT44(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT44[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 1580; LF_pointer.LF_axisUD = 200;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT44(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT44[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT45(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT45[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT45[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT45(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT45[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 230; LF_pointer.LF_axisUD = 280;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT45(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT45[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT46(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT46[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT46[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT46(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT46[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 430; LF_pointer.LF_axisUD = 300;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT46(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT46[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT47(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT47[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT47[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT47(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT47[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 710; LF_pointer.LF_axisUD = 380;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT47(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT47[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT48(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT48[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT48[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT48(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT48[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 980; LF_pointer.LF_axisUD = 330;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT48(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT48[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT49(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT49[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT49[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT49(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT49[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 1230; LF_pointer.LF_axisUD = 330;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT49(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT49[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT50(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT50[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT50[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT50(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT50[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1480; LF_pointer.LF_axisUD = 410;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT50(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT50[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT51(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT51[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT51[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT51(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT51[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1000; LF_pointer.LF_axisUD = 530;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT51(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT51[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT52(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT52[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT52[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT52(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT52[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 280; LF_pointer.LF_axisUD = 500;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT52(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT52[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT53(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT53[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT53[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT53(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT53[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 460; LF_pointer.LF_axisUD = 470;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT53(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT53[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT54(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT54[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT54[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT54(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT54[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 660; LF_pointer.LF_axisUD = 530;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT54(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT54[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT55(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT55[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT55[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT55(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT55[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 860; LF_pointer.LF_axisUD = 480;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT55(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT55[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT56(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT56[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT56[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT56(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT56[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1050; LF_pointer.LF_axisUD = 510;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT56(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT56[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT57(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT57[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT57[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT57(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT57[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1250; LF_pointer.LF_axisUD = 460;  LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT57(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT57[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT58(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT58[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT58[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT58(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT58[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1430; LF_pointer.LF_axisUD = 520;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT58(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT58[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT59(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT59[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT59[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT59(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT59[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 30; LF_pointer.LF_axisUD = 700;    LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT59(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT59[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT60(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT60[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT60[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT60(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT60[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 180; LF_pointer.LF_axisUD = 680;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT60(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT60[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT61(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT61[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT61[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT61(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT61[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 360; LF_pointer.LF_axisUD = 670;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT61(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT61[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT62(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT62[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT62[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT62(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT62[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 560; LF_pointer.LF_axisUD = 710;     	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT62(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT62[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT63(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT63[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT63[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT63(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT63[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 760; LF_pointer.LF_axisUD = 690;   LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT63(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT63[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT64(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT64[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT64[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT64(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT64[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 960; LF_pointer.LF_axisUD = 670;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT64(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT64[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT65(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT65[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT65[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT65(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT65[LF_number]);
   LF_pointer.scale_x = 1.25*(camera.arc/CA);LF_pointer.scale_y = 1.25*(camera.arc/CA);LF_pointer.LF_axisRL = 1160; LF_pointer.LF_axisUD = 675;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT65(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT65[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT66(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT66[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT66[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT66(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT66[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1310; LF_pointer.LF_axisUD = 700;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT66(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT66[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT67(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT67[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT67[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT67(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT67[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1510; LF_pointer.LF_axisUD = 680;      LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT67(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT67[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT68(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT68[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT68[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT68(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT68[LF_number]);
   LF_pointer.scale_x = 1.25*(camera.arc/CA);LF_pointer.scale_y = 1.25*(camera.arc/CA);LF_pointer.LF_axisRL = 70; LF_pointer.LF_axisUD = 880;  LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT68(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT68[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT69(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT69[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT69[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT69(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT69[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 270; LF_pointer.LF_axisUD = 840;       LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT69(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT69[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT70(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT70[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT70(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);
   LF_pointer.scale_x = 1.25*(camera.arc/CA);LF_pointer.scale_y = 1.25*(camera.arc/CA);LF_pointer.LF_axisRL = 470; LF_pointer.LF_axisUD = 870; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT70(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT71(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT71[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT71[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT71(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 670; LF_pointer.LF_axisUD = 860; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT71(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT71[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT72(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT72[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT72[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT72(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 170; LF_pointer.LF_axisUD = 420; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT72(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT72[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT73(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT73[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT73[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT73(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 575; LF_pointer.LF_axisUD = 420; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT73(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT73[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT74(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT74[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT74[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT74(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT74[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 950; LF_pointer.LF_axisUD = 410; 		LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT74(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT74[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT75(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT75[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT75[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT75(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT75[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1580; LF_pointer.LF_axisUD = 520; 	LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT75(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT75[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT76(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT76[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT76[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT76(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT70[LF_number]);
   LF_pointer.scale_x = 1.1*(camera.arc/CA);LF_pointer.scale_y = 1.1*(camera.arc/CA);LF_pointer.LF_axisRL = 460; LF_pointer.LF_axisUD = 600; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT76(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT76[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT77(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT77[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT77[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT77(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT77[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1260; LF_pointer.LF_axisUD = 600; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT77(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT77[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT78(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT78[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT78[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT78(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT78[LF_number]);
   LF_pointer.scale_x = 1.2*(camera.arc/CA);LF_pointer.scale_y = 1.2*(camera.arc/CA);LF_pointer.LF_axisRL = 150; LF_pointer.LF_axisUD = 800; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT78(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT78[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT79(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT79[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT79[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT79(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT79[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 800; LF_pointer.LF_axisUD = 820; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT79(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT79[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT80(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT80[LF_number]);  LF_pointer = ent_createlayer("LF_dirtD.tga",0,10);   LF_indxDIRT80[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT80(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT80[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1; LF_pointer.LF_axisUD = 1195; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT80(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT80[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT81(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT81[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT81[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT81(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT81[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 560; LF_pointer.LF_axisUD = 600; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT81(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT81[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT82(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT82[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT82[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT82(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT82[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 860; LF_pointer.LF_axisUD = 600; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT82(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT82[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT83(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT83[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT83[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT83(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT83[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 1380; LF_pointer.LF_axisUD = 620; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT83(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT83[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT84(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT84[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT84[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT84(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT84[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 380; LF_pointer.LF_axisUD = 780; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT84(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT84[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT85(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT85[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT85[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT85(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT85[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 900; LF_pointer.LF_axisUD = 780; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT85(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT85[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT86(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT86[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT86[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT86(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT86[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 1400; LF_pointer.LF_axisUD = 740; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT86(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT86[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT87(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT87[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT87[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT87(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT87[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 1580; LF_pointer.LF_axisUD = 780; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT87(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT87[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT88(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT88[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT88[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT88(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT88[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 200; LF_pointer.LF_axisUD = 940; 		LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT88(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT88[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT89(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT89[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT89[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT89(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT89[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 340; LF_pointer.LF_axisUD = 960; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT89(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT89[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT90(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT90[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT90[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT90(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT90[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 1040; LF_pointer.LF_axisUD = 800; 	LF_PlaceDIRT(LF_pointer); 
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT90(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT90[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT91(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT91[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT91[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT91(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT91[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 900; LF_pointer.LF_axisUD = 920; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT91(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT91[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT92(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT92[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT92[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT92(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT92[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1200; LF_pointer.LF_axisUD = 900; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT92(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT92[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT93(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT93[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT93[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT93(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT93[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1400; LF_pointer.LF_axisUD = 870; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT93(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT93[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT94(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT94[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT94[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT94(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT94[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 30; LF_pointer.LF_axisUD = 1150; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT94(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT94[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT95(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT95[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT95[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT95(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT95[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 230; LF_pointer.LF_axisUD = 1080; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT95(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT95[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT96(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT96[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT96[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT96(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT96[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 400; LF_pointer.LF_axisUD = 1130; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT96(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT96[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT97(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT97[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT97[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT97(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT97[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 600; LF_pointer.LF_axisUD = 1030; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT97(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT97[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT98(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT98[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT98[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT98(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT98[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 850; LF_pointer.LF_axisUD = 1100; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT98(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT98[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT99(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT99[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT99[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT99(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT99[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1050; LF_pointer.LF_axisUD = 1000; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT99(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT99[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT100(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT100[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT100[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT100(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT100[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 1250; LF_pointer.LF_axisUD = 1050; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT100(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT100[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT101(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT101[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,9);   LF_indxDIRT101[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT101(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT101[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1400; LF_pointer.LF_axisUD = 1000; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT101(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT101[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT102(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT102[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT102[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT102(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT102[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1520; LF_pointer.LF_axisUD = 1130; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT102(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT102[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT103(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT103[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT103[my.skill8] = handle(LF_pointer);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 450; LF_pointer.LF_axisUD = 1000; LF_PlaceDIRT(LF_pointer);   
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT103(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT103[LF_number]);LF_pointer.alpha = 100;
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT103(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT103[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT104(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT104[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT104[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT104(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT104[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 750; LF_pointer.LF_axisUD = 990; 		LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT104(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT104[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT105(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT105[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT105[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT105(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT105[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1280; LF_pointer.LF_axisUD = 810; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT105(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT105[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT106(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT106[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT106[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT106(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT106[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 1550; LF_pointer.LF_axisUD = 900; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT106(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT106[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT107(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT107[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT107[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT107(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT107[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 130; LF_pointer.LF_axisUD = 1150; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT107(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT107[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT108(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT108[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT108[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT108(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT108[LF_number]);
   LF_pointer.scale_x = 1.5*(camera.arc/CA);LF_pointer.scale_y = 1.5*(camera.arc/CA);LF_pointer.LF_axisRL = 550; LF_pointer.LF_axisUD = 1180; LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT108(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT108[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT109(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT109[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT109[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT109(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT109[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 710; LF_pointer.LF_axisUD = 1140; 	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT109(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT109[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT110(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT110[LF_number]);  LF_pointer = ent_createlayer("LF_dirtC.tga",0,9);   LF_indxDIRT110[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT110(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT110[LF_number]);
   LF_pointer.scale_x = 1.7*(camera.arc/CA);LF_pointer.scale_y = 1.7*(camera.arc/CA);LF_pointer.LF_axisRL = 1050; LF_pointer.LF_axisUD = 1150;LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT110(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT110[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT111(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT111[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT111[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT111(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT111[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 1300; LF_pointer.LF_axisUD = 1160;  	 LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT111(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT111[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT112(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT112[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT112[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT112(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT112[LF_number]);
   LF_pointer.scale_x = 2*(camera.arc/CA);LF_pointer.scale_y = 2*(camera.arc/CA);LF_pointer.LF_axisRL = 1200; LF_pointer.LF_axisUD = 1180;  	 LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT112(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT112[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT113(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT113[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT113[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT113(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT113[LF_number]);
   LF_pointer.scale_x = 3*(camera.arc/CA);LF_pointer.scale_y = 3*(camera.arc/CA);LF_pointer.LF_axisRL = 720; LF_pointer.LF_axisUD = 1180;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT113(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT113[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT114(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT114[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT114[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT114(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT114[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 920; LF_pointer.LF_axisUD = 1150;   	 LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT114(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT114[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT115(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT115[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT115[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT115(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT115[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 1540; LF_pointer.LF_axisUD = 1040;  	 LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT115(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT115[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT116(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT116[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT116[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT116(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT116[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 240; LF_pointer.LF_axisUD = 600;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT116(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT116[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT117(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT117[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT117[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT117(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT117[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 440; LF_pointer.LF_axisUD = 370;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT117(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT117[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT118(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT118[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT118[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT118(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT118[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 770; LF_pointer.LF_axisUD = 460;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT118(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT118[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT119(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT119[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT119[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT119(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT119[LF_number]);
   LF_pointer.scale_x = 4*(camera.arc/CA);LF_pointer.scale_y = 4*(camera.arc/CA);LF_pointer.LF_axisRL = 1130; LF_pointer.LF_axisUD = 460;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT119(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT119[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT120(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT120[LF_number]);  LF_pointer = ent_createlayer("LF_dirtE.tga",0,8);   LF_indxDIRT120[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT120(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT120[LF_number]);
   LF_pointer.scale_x = 5*(camera.arc/CA);LF_pointer.scale_y = 5*(camera.arc/CA);LF_pointer.LF_axisRL = 1000; LF_pointer.LF_axisUD = 50;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT120(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT120[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT121(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT121[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,7);   LF_indxDIRT121[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT121(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT121[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 170; LF_pointer.LF_axisUD = 487;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT121(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT121[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT122(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT122[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,7);   LF_indxDIRT122[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT122(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT122[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 521; LF_pointer.LF_axisUD = 609;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT122(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT122[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT123(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT123[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,7);   LF_indxDIRT123[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT123(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT123[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 668; LF_pointer.LF_axisUD = 864;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT123(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT123[LF_number]);   ent_remove(LF_pointer); }
function Init_DIRT124(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT124[LF_number]);  LF_pointer = ent_createlayer("LF_dirtA.tga",0,7);   LF_indxDIRT124[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT124(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT124[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 170; LF_pointer.LF_axisUD = 487;  	LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT124(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT124[LF_number]);   ent_remove(LF_pointer); }
									//ein haar auf der linse * * * * * *  HAIR ON THE LENS
function Init_DIRT125(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxDIRT125[LF_number]);  LF_pointer = ent_createlayer("LF_dirtG.tga",0,10);   LF_indxDIRT125[my.skill8] = handle(LF_pointer);
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function AlphaCont_DIRT125(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxDIRT125[LF_number]);
   LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);LF_pointer.LF_axisRL = 550; LF_pointer.LF_axisUD = 30;  		 LF_PlaceDIRT(LF_pointer);
   if (my.skill60 < 1600 && my.skill60 > 0 && my.skill61 < 1200 && my.skill61 > 0)
   {
	   LF_pointer.LF_temp1 = vec_dist(LF_pointer.LF_axisRL, my.skill60);	LF_pointer.LF_temp2 = (100/my.skill5)*LF_pointer.LF_temp1;
		LF_pointer.LF_temp3 = (my.skill6/100)*LF_pointer.LF_temp2;			LF_pointer.alpha=(my.skill6-LF_pointer.LF_temp3)*(my.skill22/100)*(my.skill90/100); 	
	}	else {LF_pointer.alpha = 0;}
}
function Remove_DIRT125(LF_number) {	LF_pointer = ptr_for_handle(LF_indxDIRT125[LF_number]);   ent_remove(LF_pointer); }

//wenn eine lichtquelle lens-dust-fx hat, kreieren wir noch zusätzlich eine art aura auf den dust-flares, dem zentrum der lichtquelle
//we create an "aura" in addition to the lens-dust-fx, in the middle of the lightsource
									function InitializeLF_DUST_FX(LF_number)
									{
										LF_pointer = ptr_for_handle(LF_indxDust[LF_number]);		LF_pointer = ent_createlayer("LF_dirtF.tga",0,5);
									   LF_indxDust[my.skill8] = handle(LF_pointer);LF_pointer.alpha = 0;	   	LF_pointer.LF_pivot_dist = 1;	
									   vec_Set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));
									}
									function PlaceLF_DUST_FX(LF_number)
									{	
									   LF_pointer = ptr_for_handle(LF_indxDust[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
									}
									function AlphaControl_DUST_FX(LF_number)
									{	
									   LF_pointer = ptr_for_handle(LF_indxDust[LF_number]);    LF_pointer.alpha = my.skill22;	
									   LF_pointer.alpha = min(my.skill9, (max(LF_pointer.alpha, 0)));//max/min. alpha wert! (maxwert aus skill9 der action bezogen), denn...
									}//...manchmal können mehrere lichtquellen nebeneinander ein zu grosser aura-wert erzeugen, der das bild übersteuert (zu hell macht)...
									//...dann lohnt es sich deren wert kleiner zu machen
									//skill9 is a max/min alpha value for the "aura". if you have more than a lightsource with lens-dusts in the same place, they can overlight 
									//the hole screen, so its a good thing to minimize the max alpha value of the auras..
									function SpecialFX_DUST_FX(stretch)
									{
										LF_pointer = ptr_for_handle(LF_indxDust[stretch]);		LF_pointer.scale_x = my.skill5/200;LF_pointer.scale_y = my.skill5/200;
									}
									function Remove_DUST_FX(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxDust[LF_number]);	   ent_remove(LF_pointer); }

//steuere die funktionen der dust-flares
function	lens_dust_flares_INIT()//a shortcut function to controll all dust-flares
{
	InitializeLF_DUST_FX(my.skill8);//aura
	Init_DIRT1(my.skill8);Init_DIRT2(my.skill8);Init_DIRT3(my.skill8);Init_DIRT4(my.skill8);Init_DIRT5(my.skill8);Init_DIRT6(my.skill8);Init_DIRT7(my.skill8);//rest..
	Init_DIRT8(my.skill8);Init_DIRT9(my.skill8);Init_DIRT10(my.skill8);Init_DIRT11(my.skill8);Init_DIRT12(my.skill8);Init_DIRT13(my.skill8);Init_DIRT14(my.skill8);
	Init_DIRT15(my.skill8);Init_DIRT16(my.skill8);Init_DIRT17(my.skill8);Init_DIRT18(my.skill8);Init_DIRT19(my.skill8);Init_DIRT20(my.skill8);Init_DIRT21(my.skill8);
	Init_DIRT22(my.skill8);Init_DIRT23(my.skill8);Init_DIRT24(my.skill8);Init_DIRT25(my.skill8);Init_DIRT26(my.skill8);Init_DIRT27(my.skill8);Init_DIRT28(my.skill8);
	Init_DIRT29(my.skill8);Init_DIRT30(my.skill8);Init_DIRT31(my.skill8);Init_DIRT32(my.skill8);Init_DIRT33(my.skill8);Init_DIRT34(my.skill8);Init_DIRT35(my.skill8);
	Init_DIRT36(my.skill8);Init_DIRT37(my.skill8);Init_DIRT38(my.skill8);Init_DIRT39(my.skill8);Init_DIRT40(my.skill8);Init_DIRT41(my.skill8);Init_DIRT42(my.skill8);
	Init_DIRT43(my.skill8);Init_DIRT44(my.skill8);Init_DIRT45(my.skill8);Init_DIRT46(my.skill8);Init_DIRT47(my.skill8);Init_DIRT48(my.skill8);Init_DIRT49(my.skill8);
	Init_DIRT50(my.skill8);Init_DIRT51(my.skill8);Init_DIRT52(my.skill8);Init_DIRT53(my.skill8);Init_DIRT54(my.skill8);Init_DIRT55(my.skill8);Init_DIRT56(my.skill8);
	Init_DIRT57(my.skill8);Init_DIRT58(my.skill8);Init_DIRT59(my.skill8);Init_DIRT60(my.skill8);Init_DIRT61(my.skill8);Init_DIRT62(my.skill8);Init_DIRT63(my.skill8);
	Init_DIRT64(my.skill8);Init_DIRT65(my.skill8);Init_DIRT66(my.skill8);Init_DIRT67(my.skill8);Init_DIRT68(my.skill8);Init_DIRT69(my.skill8);Init_DIRT70(my.skill8);
	Init_DIRT71(my.skill8);Init_DIRT72(my.skill8);Init_DIRT73(my.skill8);Init_DIRT74(my.skill8);Init_DIRT75(my.skill8);Init_DIRT76(my.skill8);Init_DIRT77(my.skill8);
	Init_DIRT78(my.skill8);Init_DIRT79(my.skill8);Init_DIRT80(my.skill8);Init_DIRT81(my.skill8);Init_DIRT82(my.skill8);Init_DIRT83(my.skill8);Init_DIRT84(my.skill8);
	Init_DIRT85(my.skill8);Init_DIRT86(my.skill8);Init_DIRT87(my.skill8);Init_DIRT88(my.skill8);Init_DIRT89(my.skill8);Init_DIRT90(my.skill8);Init_DIRT91(my.skill8);
	Init_DIRT92(my.skill8);Init_DIRT93(my.skill8);Init_DIRT94(my.skill8);Init_DIRT95(my.skill8);Init_DIRT96(my.skill8);Init_DIRT97(my.skill8);Init_DIRT98(my.skill8);
	Init_DIRT99(my.skill8);Init_DIRT100(my.skill8);Init_DIRT101(my.skill8);Init_DIRT102(my.skill8);Init_DIRT103(my.skill8);Init_DIRT104(my.skill8);
	Init_DIRT105(my.skill8);Init_DIRT106(my.skill8);Init_DIRT107(my.skill8);Init_DIRT108(my.skill8);Init_DIRT109(my.skill8);Init_DIRT110(my.skill8);
	Init_DIRT111(my.skill8);Init_DIRT112(my.skill8);Init_DIRT113(my.skill8);Init_DIRT114(my.skill8);Init_DIRT115(my.skill8);Init_DIRT116(my.skill8);
	Init_DIRT117(my.skill8);Init_DIRT118(my.skill8);Init_DIRT119(my.skill8);Init_DIRT120(my.skill8);Init_DIRT121(my.skill8);Init_DIRT122(my.skill8);
	Init_DIRT123(my.skill8);Init_DIRT124(my.skill8);Init_DIRT125(my.skill8);
}
function lens_dust_flares_ALPHA()
{
	PlaceLF_DUST_FX(my.skill8);AlphaControl_DUST_FX(my.skill8);SpecialFX_DUST_FX(my.skill8);//zusatz Dustflare FX für die aura
	AlphaCont_DIRT1(my.skill8);AlphaCont_DIRT2(my.skill8);AlphaCont_DIRT3(my.skill8);AlphaCont_DIRT4(my.skill8);AlphaCont_DIRT5(my.skill8);AlphaCont_DIRT6(my.skill8);
	AlphaCont_DIRT7(my.skill8);AlphaCont_DIRT8(my.skill8);AlphaCont_DIRT9(my.skill8);AlphaCont_DIRT10(my.skill8);AlphaCont_DIRT11(my.skill8);AlphaCont_DIRT12(my.skill8);
	AlphaCont_DIRT13(my.skill8);AlphaCont_DIRT14(my.skill8);AlphaCont_DIRT15(my.skill8);AlphaCont_DIRT16(my.skill8);AlphaCont_DIRT17(my.skill8);
	AlphaCont_DIRT18(my.skill8);AlphaCont_DIRT19(my.skill8);AlphaCont_DIRT20(my.skill8);AlphaCont_DIRT21(my.skill8);AlphaCont_DIRT22(my.skill8);
	AlphaCont_DIRT23(my.skill8);AlphaCont_DIRT24(my.skill8);AlphaCont_DIRT25(my.skill8);AlphaCont_DIRT26(my.skill8);AlphaCont_DIRT27(my.skill8);
	AlphaCont_DIRT28(my.skill8);AlphaCont_DIRT29(my.skill8);AlphaCont_DIRT30(my.skill8);AlphaCont_DIRT31(my.skill8);AlphaCont_DIRT32(my.skill8);
	AlphaCont_DIRT33(my.skill8);AlphaCont_DIRT34(my.skill8);AlphaCont_DIRT35(my.skill8);AlphaCont_DIRT36(my.skill8);AlphaCont_DIRT37(my.skill8);
	AlphaCont_DIRT38(my.skill8);AlphaCont_DIRT39(my.skill8);AlphaCont_DIRT40(my.skill8);AlphaCont_DIRT41(my.skill8);AlphaCont_DIRT42(my.skill8);
	AlphaCont_DIRT43(my.skill8);AlphaCont_DIRT44(my.skill8);AlphaCont_DIRT45(my.skill8);AlphaCont_DIRT46(my.skill8);AlphaCont_DIRT47(my.skill8);
	AlphaCont_DIRT48(my.skill8);AlphaCont_DIRT49(my.skill8);AlphaCont_DIRT50(my.skill8);AlphaCont_DIRT51(my.skill8);AlphaCont_DIRT52(my.skill8);
	AlphaCont_DIRT53(my.skill8);AlphaCont_DIRT54(my.skill8);AlphaCont_DIRT55(my.skill8);AlphaCont_DIRT56(my.skill8);AlphaCont_DIRT57(my.skill8);
	AlphaCont_DIRT58(my.skill8);AlphaCont_DIRT59(my.skill8);AlphaCont_DIRT60(my.skill8);AlphaCont_DIRT61(my.skill8);AlphaCont_DIRT62(my.skill8);
	AlphaCont_DIRT63(my.skill8);AlphaCont_DIRT64(my.skill8);AlphaCont_DIRT65(my.skill8);AlphaCont_DIRT66(my.skill8);AlphaCont_DIRT67(my.skill8);
	AlphaCont_DIRT68(my.skill8);AlphaCont_DIRT69(my.skill8);AlphaCont_DIRT70(my.skill8);AlphaCont_DIRT71(my.skill8);AlphaCont_DIRT72(my.skill8);
	AlphaCont_DIRT73(my.skill8);AlphaCont_DIRT74(my.skill8);AlphaCont_DIRT75(my.skill8);AlphaCont_DIRT76(my.skill8);AlphaCont_DIRT77(my.skill8);
	AlphaCont_DIRT78(my.skill8);AlphaCont_DIRT79(my.skill8);AlphaCont_DIRT80(my.skill8);AlphaCont_DIRT81(my.skill8);AlphaCont_DIRT82(my.skill8);
	AlphaCont_DIRT83(my.skill8);AlphaCont_DIRT84(my.skill8);AlphaCont_DIRT85(my.skill8);AlphaCont_DIRT86(my.skill8);AlphaCont_DIRT87(my.skill8);
	AlphaCont_DIRT88(my.skill8);AlphaCont_DIRT89(my.skill8);AlphaCont_DIRT90(my.skill8);AlphaCont_DIRT91(my.skill8);AlphaCont_DIRT92(my.skill8);
	AlphaCont_DIRT93(my.skill8);AlphaCont_DIRT94(my.skill8);AlphaCont_DIRT95(my.skill8);AlphaCont_DIRT96(my.skill8);AlphaCont_DIRT97(my.skill8);
	AlphaCont_DIRT98(my.skill8);AlphaCont_DIRT99(my.skill8);AlphaCont_DIRT100(my.skill8);AlphaCont_DIRT101(my.skill8);AlphaCont_DIRT102(my.skill8);
	AlphaCont_DIRT103(my.skill8);AlphaCont_DIRT104(my.skill8);AlphaCont_DIRT105(my.skill8);AlphaCont_DIRT106(my.skill8);AlphaCont_DIRT107(my.skill8);
	AlphaCont_DIRT108(my.skill8);AlphaCont_DIRT109(my.skill8);AlphaCont_DIRT110(my.skill8);AlphaCont_DIRT111(my.skill8);AlphaCont_DIRT112(my.skill8);
	AlphaCont_DIRT113(my.skill8);AlphaCont_DIRT114(my.skill8);AlphaCont_DIRT115(my.skill8);AlphaCont_DIRT116(my.skill8);AlphaCont_DIRT117(my.skill8);
	AlphaCont_DIRT118(my.skill8);AlphaCont_DIRT119(my.skill8);AlphaCont_DIRT120(my.skill8);AlphaCont_DIRT121(my.skill8);AlphaCont_DIRT122(my.skill8);
	AlphaCont_DIRT123(my.skill8);AlphaCont_DIRT124(my.skill8);AlphaCont_DIRT125(my.skill8);
}
function lens_dust_flares_REMOVE()
{
	Remove_DUST_FX(my.skill8);//aura bye bye
	Remove_DIRT1(my.skill8);Remove_DIRT2(my.skill8);Remove_DIRT3(my.skill8);Remove_DIRT4(my.skill8);Remove_DIRT5(my.skill8);Remove_DIRT6(my.skill8);//rest bye bye
	Remove_DIRT7(my.skill8);Remove_DIRT8(my.skill8);Remove_DIRT9(my.skill8);Remove_DIRT10(my.skill8);Remove_DIRT11(my.skill8);Remove_DIRT12(my.skill8);
	Remove_DIRT13(my.skill8);Remove_DIRT14(my.skill8);Remove_DIRT15(my.skill8);Remove_DIRT16(my.skill8);Remove_DIRT17(my.skill8);Remove_DIRT18(my.skill8);
	Remove_DIRT19(my.skill8);Remove_DIRT20(my.skill8);Remove_DIRT21(my.skill8);Remove_DIRT22(my.skill8);Remove_DIRT23(my.skill8);Remove_DIRT24(my.skill8);
	Remove_DIRT25(my.skill8);Remove_DIRT26(my.skill8);Remove_DIRT27(my.skill8);Remove_DIRT28(my.skill8);Remove_DIRT29(my.skill8);Remove_DIRT30(my.skill8);
	Remove_DIRT31(my.skill8);Remove_DIRT32(my.skill8);Remove_DIRT33(my.skill8);Remove_DIRT34(my.skill8);Remove_DIRT35(my.skill8);Remove_DIRT36(my.skill8);
	Remove_DIRT37(my.skill8);Remove_DIRT38(my.skill8);Remove_DIRT39(my.skill8);Remove_DIRT40(my.skill8);Remove_DIRT41(my.skill8);Remove_DIRT42(my.skill8);
	Remove_DIRT43(my.skill8);Remove_DIRT44(my.skill8);Remove_DIRT45(my.skill8);Remove_DIRT46(my.skill8);Remove_DIRT47(my.skill8);Remove_DIRT48(my.skill8);
	Remove_DIRT49(my.skill8);Remove_DIRT50(my.skill8);Remove_DIRT51(my.skill8);Remove_DIRT52(my.skill8);Remove_DIRT53(my.skill8);Remove_DIRT54(my.skill8);
	Remove_DIRT55(my.skill8);Remove_DIRT56(my.skill8);Remove_DIRT57(my.skill8);Remove_DIRT58(my.skill8);Remove_DIRT59(my.skill8);Remove_DIRT60(my.skill8);
	Remove_DIRT61(my.skill8);Remove_DIRT62(my.skill8);Remove_DIRT63(my.skill8);Remove_DIRT64(my.skill8);Remove_DIRT65(my.skill8);Remove_DIRT66(my.skill8);
	Remove_DIRT67(my.skill8);Remove_DIRT68(my.skill8);Remove_DIRT69(my.skill8);Remove_DIRT70(my.skill8);Remove_DIRT71(my.skill8);Remove_DIRT72(my.skill8);
	Remove_DIRT73(my.skill8);Remove_DIRT74(my.skill8);Remove_DIRT75(my.skill8);Remove_DIRT76(my.skill8);Remove_DIRT77(my.skill8);Remove_DIRT78(my.skill8);
	Remove_DIRT79(my.skill8);Remove_DIRT80(my.skill8);Remove_DIRT81(my.skill8);Remove_DIRT82(my.skill8);Remove_DIRT83(my.skill8);Remove_DIRT84(my.skill8);
	Remove_DIRT85(my.skill8);Remove_DIRT86(my.skill8);Remove_DIRT87(my.skill8);Remove_DIRT88(my.skill8);Remove_DIRT89(my.skill8);Remove_DIRT90(my.skill8);
	Remove_DIRT91(my.skill8);Remove_DIRT92(my.skill8);Remove_DIRT93(my.skill8);Remove_DIRT94(my.skill8);Remove_DIRT95(my.skill8);Remove_DIRT96(my.skill8);
	Remove_DIRT97(my.skill8);Remove_DIRT98(my.skill8);Remove_DIRT99(my.skill8);Remove_DIRT100(my.skill8);Remove_DIRT101(my.skill8);Remove_DIRT102(my.skill8);
	Remove_DIRT103(my.skill8);Remove_DIRT104(my.skill8);Remove_DIRT105(my.skill8);Remove_DIRT106(my.skill8);Remove_DIRT107(my.skill8);Remove_DIRT108(my.skill8);
	Remove_DIRT109(my.skill8);Remove_DIRT110(my.skill8);Remove_DIRT111(my.skill8);Remove_DIRT112(my.skill8);Remove_DIRT113(my.skill8);Remove_DIRT114(my.skill8);
	Remove_DIRT115(my.skill8);Remove_DIRT116(my.skill8);Remove_DIRT117(my.skill8);Remove_DIRT118(my.skill8);Remove_DIRT119(my.skill8);Remove_DIRT120(my.skill8);
	Remove_DIRT121(my.skill8);Remove_DIRT122(my.skill8);Remove_DIRT123(my.skill8);Remove_DIRT124(my.skill8);Remove_DIRT125(my.skill8);	my.flag2 = 0;
}

//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////

function LF_tracer()
{//diese trace funktion benützen alle lichtquellen mit lens-flares. 		
//any lightsource are using this trace function.
	if (c_trace (my.x,camera.x,IGNORE_ME|IGNORE_YOU|IGNORE_PASSABLE|USE_POLYGON) > 0) {my.skill100 = 1;}else {my.skill100 = 0;}
}
function LF_sunAURA
{
	my.passable = on;my.bright = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.scale_x = 16;my.scale_y = 7;
	while(1)	{	my.pan = you.pan;my.tilt = you.tilt; my.alpha = (20/100*(you.skill90+80))+random((2/100)*you.skill90);	wait(1);	}
}
action LF_sun
{
//skill1 distanz aktivator von kamera zu meiner position. die sonne hat kein distanzaktivator wird von der action "event_triggers" ein/ausgeschaltet
//skill2,3,4: = farbkode (blau/grün/rot) [wird normalerweise für die lens-dust-effekte verwendet, kann aber auch zum färben der lichtquelle benützt werden]
//skill5: radius der lens-dust-effekte. in dieser zone sollte man dann die dirt-flares sehen können. ps: aktiviere flag8 für lens-dust-effekte!
//skill6: max alphawert der dustflares. dieser alphawert ist nicht mit dem hauptflare alphawert zu verwechseln. 
//bsp: bei meiner sonne behält der hauptflare immer noch ein mindest alphawert, wenn die kamera aussersicht ist (oder hindernisse auftreten). dasselbe gilt..
//...auch für fenster-flare. im gegensatz zu den dustflares die dann bei hindernissen oder ausserhalb kamerasicht, komplett auf 0 abgefadet werden müssen!...
//skill7: maximalALPHAwert der lichtquelle, bzw, der fensterscheibe, die kann auch tiefer sein als die dustflares!
//skill8 ID's der lichtquellen. jede lichtquelle MUSS eine andere id haben!
//skill9 max alpha wert für die aura des lens-dust-fx. die sollte kleiner sein als max wert des skill6 und noch viel kleiner wenn mehrere lichtquellen zusammen stehen..
//...sonst könnte das bild übersteuern, zu hell werden!
//PS: skill1-9 daten müssen im WED eingegeben werden!
//skill24-59; 80-89; 93-99; können für diverse zwischenspeicherungen genutzt werden...
//skill21: distanz fader für distanzaktive lichtquellen. bei der sonne MUSS my.skill21 = 100; gesetzt werden!
//skill22,23: alpha distanzwert für lens-dust-effekte
//skill60: positions ermittlung für lens-dust effekt, damit deren alpha wert eingestellt werden kann. ist nicht gleich wie skill70
//skill65-68 wenn die kamera direkt in die lichtquelle zeigt, findet bei gewissen lichtquellen eine zusätzliche aufhellung statt (oder andere spez. fx)
//skill70 kopiere meine position auf skill70 um alle lens-flares zu positionieren
//skill90: zusätzlicher alphafader falls hindernisse vor kamera und hauptflare auftreten oder hauptflare ausserhalb kamerasicht fällt
//skill91 & 92: werte zwischenspeicherung, falls die flares ausserhalb der kamerasicht gelangen wird alpha auch abgefadet. ("nimm immer den kleineren wert an")
//skill100: hindernisse beim tracen festgestellt.
//--flag1: schalter. hauptflare wurde komplett abgefadet. wenn dann kein hindernis mehr vorhanden ist und my.flag1 = 1 ist, dann blende flare(s) wieder ein.
//flag2: für distanzaktive leuchtquellen, ist ein/aus schalter der seine flares generiert und diese dann wieder eliminiert bei distanz (skill1)
//--flag8: diese lichtquelle produziert "lens-dust-effekte".

//SKILL USAGE:
/*
skill1: distance activator from camera and my position. the sun has no ditance active event. she will be activatet with a trigger/switch (action "event_triggers")
skill2-4: colour code (blue/green/red) used for lens-dust-flares coloration. (or other purposes)
skill5: the radius of the lens-dust-flares where the lightsource influences the dust-flares. (alpha) dont forget to switch flag8 if you want lens-dust-fx on a lightsource
skill6: max. alphavalue of the dust-flares. its not the same alpha value of the lightsource! the lightsource can be stronger while the dust-flares are weaker. 
skill7: max. alpha value of the lightsource.
skill8: unique id of the lightsource. any lightsource MUST have an unique id! (error message!)
skill9: max. alpha value for the aura of the primary lens-dust-flare (round big one). if you have more than one lightsource with active lens-dust-flares, it can happen 
			that the	screen appears too bright, so it's a good thing to lower the value for all surrounding lightsource with active lens-dust-flares.
PS: put the skill1-9 values in WED on all lightsources
skill24-59 & 80-89 & 93-99 can be used for various other purposes.
skill21: distance activating/regulating value to check the max-min alpha value. put 100 on lightsources like the sun!
skill22,23: regulation of the alpha value (lens-dust-flares)
skill65-68: show some effects if the camera turn exactly in the middle of the lightsource (like brighten up the screen)
skill70-72: copy my position to the lens-flare position
skill90: if there are some obstacles in front of the lightsource, or the camera goes off-screen there will be a fade out of the alpha value
skill91,92: save some values in this skills (off-screen)
skill100: obstacles while traced
flag1: switch on/off: activate in case of obstacles
flag2: only for distance active lightsources. SWITCH to initialize the used lens-flares. 
flag8: this lightsource is using lens-dust-flares. (check it ON, in WED)
*/

	my.scale_x = 1.2;my.scale_y = 1.2;var my_temp[2];var my_temp2[2];my.passable = on;my.bright = on; my.ambient = 100;my.albedo=-100;my.transparent = on;my.alpha = 100;
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = 100;my.skill92 = 100;//stelle diese anfangswerte ein für alpha fadeout. INITIAL VALUES FOR ALPHA FADEOUT
	my.skill66 = 20;my.skill21 = 100;
	ent_create("LF_sunB.tga", my.pos, LF_sunAURA);//zusatzbild, aura hinter der sonne die IMMER bleiben muss (aus meiner meinung.... ;-)
	//i think there must be allways an aura with the sun, that shines even if the camera goes off-screen or in case of obstacles...

	while(1)
	{
		vec_set(my.skill80, camera.x);vec_sub(my.skill80, my.x);vec_to_angle(my.pan, my.skill80);
		//alpha wert der sonne ist nicht gleich alphawert der lens-dust, die dann, ausserhalb der kamerasicht unsichtbar werden müssen
		//don't forget: the alpha value of the sun is not the same value of the dust-flares. they have to go 0 behind an obstacle or off-screen, but not with the aura 
		//or the sun (the targa picture i WED "SUN")
		my.alpha = (my.skill7-(my.skill90/2))+random((2/100)*my.skill90);
		my.skill23 = (100/my.skill7)*my.skill90;//berechne zuerst den % wert des skill90 (wenn ausserhalb der kamerabereich gelangt) (zwischenspeicherung)
		//first we are calculating the %value if the camera goes off-screen (skill90)
		my.skill22 = ((my.skill7/100)*my.skill21)*(my.skill23/100);//berechne max alphawert * %wert (ausserhalb kamerasicht)
		//dieser wert wird dann der funktion lens_dust_flares_ALPHA() zu den einzelnen, im bereich liegenden dust-flares weitergegeben.
		//then, we calculate the max. alpha value in off-screen mode (this value need the dust-flares, see the function lens_dust_flares_ALPHA() )

		//bei der sonne fragen wir nach einem event nach, damit die sonne nicht unnötig traced. BSP: draussen = immer leuchten, keine distanz relevanz. drinnen: 
		//frage nach ob spieler (bzw. kamera) draussen, an einem fenster, oder ein loch an der wand steht, dort sollte man dann wieder die sonne+flares sehen müssen!
		//now we wait for an event to switch on/off the lens-flares of the sun. (see action event_triggers)
		if (sun_start == 1)
		{
			LF_tracer();//führe einen trace von mir (sonne) zur kamera aus. hindernisse? schalte sonne ein/aus. NOW TRACE FROM ME TO THE CAMERA
			vec_set(my.skill70, my.pos);//kopiere position der sonne auf meine pos, da vec_to_screen nichts mit me oder my.pos anstellen kann!
			//copy my position to my skill70-72. the request vec_to_screen(... doesn't permit the command "me" or "my.pos" (error)
			
			if (my.flag2 == 0) {lens_dust_flares_INIT(); my.flag2 = 1;}//starte nun auch die lens-dust-flares. mit dieser funktion werden sie ALLE auf's mal kreiert,..
			//..erhalten eine eindeutige id mit handle, damit man sie, von dieser action aus, ansprechen kann. in der funktion lens_dust_flares_ALPHA() werden sie dann
			//gesteuert (alpha wert). im zentrum der lichtquelle werden dann, deren alphawerte heller gemacht, ausserhalb = dunkel
			//start now the lens-dust-flares. they will be all created at once and receive an unique id number (skill8), so this action can control them independently, 
			//even their alpha value or other special effects. the lens-dust-flare in the radius(skill5) that reaches the lightsource-centre will be brighten up.

			my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)//ausser kamerasicht bereich oder hindernisse. OBSTACLES OR OFF-SCREEN ***
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = 100;my.skill92 = 100;
				//wieso müssen die gleichen kack zeilen (in der else anweisung) auch hier angegeben werden? (unterhalb der else anweisung klappt nicht!?!)
				// i don't know why the same lines bellow must be put here, in this place too??
				LF_SUN_1a.roll += 0.03 * time; LF_SUN_1b.roll -= 0.06 * time;		LF_SUN_1a.alpha=(60/100*my.skill90)+random((0.02)*my.skill90);
				LF_SUN_1b.alpha=(60/100)*my.skill90+random((0.02)*my.skill90);		LF_SUN_2.alpha=(100/100)*my.skill90;
				LF_SUN_3.alpha=(15/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_4.alpha=(25/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_5.alpha=(60/100)*my.skill90+random((0.01)*my.skill90);		LF_SUN_6.alpha=(60/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_7.alpha=(40/100)*my.skill90+random((1)*my.skill90);			LF_SUN_8.alpha=(40/100)*my.skill90+random((1)*my.skill90);
				LF_SUN_9.alpha=(12/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_10.alpha=(8/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_11.alpha=(12/100)*my.skill90+random((0.02)*my.skill90);		LF_SUN_12.alpha=(6/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_13.alpha=(9/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_14.alpha=(15/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_15.alpha=(7/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_16.alpha=(28/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_17.alpha=(8/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_18.alpha=(11/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_19.alpha=(9/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_20.alpha=(3/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_21.alpha=(5/100)*my.skill90+random((0.01)*my.skill90);		LF_SUN_22.alpha=(10/100)*my.skill90+random((0.02)*my.skill90);
				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }//steuere auch die alpha der lens-dust-flares
			}

			else //alle lens-flares sind nun sichtbar. LENS-FLARES ARE NOW VISIBLE ***
			{
				my.skill70 -= 0.5 * screen_size.x;	my.skill71 -= 0.5 * screen_size.y;//nicht vergessen my ist diese action die die flares kontrolliert
				//don't forget: my is the lightsource (action) and not the lens-flares
				//alle flares werden einzeln in der funktion "LF_Place" positioniert und weitere einstellungen werden auch dort gemacht * * * * *
				//all the flares will be controlled and regulated in this single functions (LF_Place)
				LF_Place(LF_SUN_1a, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_1b, vector(my.skill70,my.skill71,my.skill72));	
				LF_Place(LF_SUN_2, vector(my.skill70,my.skill71,my.skill72)); LF_Place(LF_SUN_3, vector(my.skill70,my.skill71,my.skill72));
				LF_Place(LF_SUN_4, vector(my.skill70,my.skill71,my.skill72)); LF_Place(LF_SUN_9, vector(my.skill70,my.skill71,my.skill72));
				LF_Place(LF_SUN_11, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_12, vector(my.skill70,my.skill71,my.skill72));	
				LF_Place(LF_SUN_13, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_14, vector(my.skill70,my.skill71,my.skill72));
				LF_Place(LF_SUN_15, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_16, vector(my.skill70,my.skill71,my.skill72));
				LF_Place(LF_SUN_17, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_18, vector(my.skill70,my.skill71,my.skill72));	
				LF_Place(LF_SUN_19, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_20, vector(my.skill70,my.skill71,my.skill72));
				LF_Place(LF_SUN_21, vector(my.skill70,my.skill71,my.skill72));LF_Place(LF_SUN_22, vector(my.skill70,my.skill71,my.skill72));

				//diese lens flares bewegen sich auch auf einer achse: * * * * *
				//this lens-flares moves in one axis too (LF_PlaceX = horizontal axis or LF_PlaceXY = horizontal & vertical axis)
				LF_PlaceX(LF_SUN_5, vector(my.skill70,my.skill71,my.skill72));LF_PlaceX(LF_SUN_6, vector(my.skill70,my.skill71,my.skill72));//bewege auf horizontaler achse
				LF_PlaceX(LF_SUN_7, vector(my.skill70,my.skill71,my.skill72));LF_PlaceX(LF_SUN_8, vector(my.skill70,my.skill71,my.skill72)); 
				LF_PlaceXY(LF_SUN_10, vector(my.skill70,my.skill71,my.skill72));//dieser hier auf allen achsen (regenbogen flare). THIS ONE RAINBOW FLARE IN ALL AXIS

				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }//the alpha of "lens-dust-effects" * * * * *

				//sonne bewegt sich langsam ausserhalb der kameraposition, fadeout flares * * * * *
				//The sun moves off-screen, regulate the alpha fadeout
				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}
				
				//in den ecken der kamerasicht wird es etwas kniffliger. welchen wert muss man jetzt nehmen (x oder y?) macht probleme beim abfaden. deshalb,...
				//what now? in the edges of the screen its a litle problematic. what value should i take? take allways the smaller one...
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}//...nimm immer den kleineren wert an

				//flare, spezial: drehen &-oder flimmern. ps: alpha wert hängt dann vom haupt-fader (skill90) ab.  * * * * *
				//(hinter einem objekt oder ausserhalb kamera sicht wird gefadet mit dem haupt-alpha-wert: skill90)
				//some special lens-flares can turn arround or flickering. skill90 is a kind of master alpha fadeout, if camera goes off-screen or obstacles in my way...
				LF_SUN_1a.roll += 0.03 * time; LF_SUN_1b.roll -= 0.06 * time;		LF_SUN_1a.alpha=(60/100*my.skill90)+random((0.02)*my.skill90);
				LF_SUN_1b.alpha=(60/100)*my.skill90+random((0.02)*my.skill90);		LF_SUN_2.alpha=(my.skill66/100)*my.skill90;
				LF_SUN_3.alpha=(15/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_4.alpha=(25/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_5.alpha=(60/100)*my.skill90+random((0.01)*my.skill90);		LF_SUN_6.alpha=(60/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_7.alpha=(40/100)*my.skill90+random((1)*my.skill90);			LF_SUN_8.alpha=(40/100)*my.skill90+random((1)*my.skill90);
				LF_SUN_9.alpha=(12/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_10.alpha=(8/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_11.alpha=(12/100)*my.skill90+random((0.02)*my.skill90);		LF_SUN_12.alpha=(6/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_13.alpha=(9/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_14.alpha=(15/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_15.alpha=(7/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_16.alpha=(28/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_17.alpha=(8/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_18.alpha=(11/100)*my.skill90+random((0.01)*my.skill90);
				LF_SUN_19.alpha=(9/100)*my.skill90+random((0.008)*my.skill90);		LF_SUN_20.alpha=(3/100)*my.skill90+random((0.008)*my.skill90);
				LF_SUN_21.alpha=(5/100)*my.skill90+random((0.01)*my.skill90);		LF_SUN_22.alpha=(10/100)*my.skill90+random((0.02)*my.skill90);

				//camera zeigt voll in die sonne, starke lichtaufhellung zeigen. (gillt nur für ein flare der sonne: "LF_SUN_2") * * * * *
				//the flare LF_SUN_2 can brighten up if you look directly in to the sun. (but you can do some other effects in addition)
				my.skiLL67 = abs(my.skill70);my.skiLL68 = abs(my.skill71);
				if (my.skiLL67 > my.skiLL68) {my.skiLL66 = (100-my.skiLL67);}if (my.skiLL68 > my.skiLL67) {my.skiLL66 = (100-my.skiLL68);}

				//weitere spezial effekte: - stretch lensflares... * * * * * 
				LF_SUN_3.scale_x = abs(my.skill70/60);LF_SUN_3.scale_y = abs(my.skill70/100);
				LF_SUN_4.scale_x = abs(my.skill70/200);LF_SUN_4.scale_y = abs(my.skill70/100);
				LF_SUN_5.scale_x = abs(my.skill70/700);LF_SUN_5.scale_y = abs(my.skill70/350);LF_SUN_6.scale_x= abs(my.skill70/700);LF_SUN_6.scale_y = abs(my.skill70/350);
				LF_SUN_7.scale_x = abs(my.skill70/100);LF_SUN_8.scale_x= abs(my.skill70/100);

				//stretch effekt nach distanzberechnung zum nullpunkt: * * * * * (regenbogen flare, klebt immer am mittelpunkt und dehnt sich in gegenrichtung der kamera)
				//this particular lens-flare (rainbow) sticks with his slim part in the middle of the sun and turns away from the camera pan/tilt (stretch included)
				my_temp[0] = abs(my.skill70) - (abs(my.skill70)-abs(my.skill70));my_temp[1] = abs(my.skill71) - (abs(my.skill71)-abs(my.skill71));
				my.skill95 = sqrt(my_temp[0]*my_temp[0] + my_temp[1]*my_temp[1]);   
				LF_SUN_9.scale_x = my.skill95/100;LF_SUN_9.scale_y = my.skill95/100;		LF_SUN_10.scale_x = my.skill95/250;LF_SUN_10.scale_y = my.skill95/250;

				//drehe zusätzlich, roll-wert dieser lens flares * * * * *
				vec_diff(my.skill30, camera.pan, camera.tilt);LF_SUN_9.roll = my.skill30-60; 
				//spezieller ringflare (regenbogen). die feine stelle klebt immer an der sonne, wo immer die kamera hindreht
				my_temp2[0] = (my.skill70 - my.skill70);my_temp2[1] = (my.skill71-my.skill71);		vec_set(my.skill50, my.skill70);
				vec_sub(my.skill50, my_temp2[0]); vec_to_angle(my.skill55, my.skill50);					LF_SUN_10.roll = my.skill55-(my.skill55*2)-90;

				//ein paar zusätzliche effekte für diese spezial-flares (diese view-entity ist ein model statt eine targa file)
				//this particular lens-flare is not a targa-pic!!! it's a model-entity. we can make a special effect with it (move his skin) if the camera turn arround
				if (mouse_force.x > 0 || mouse_force.x < 0) //bewege mein skinbild je nach kamera bewegung
				{LF_SUN_21.v += (camera.pan*camera.pan);LF_SUN_22.v += (camera.pan*camera.pan);} 
					else {LF_SUN_21.v += 0.4*time;LF_SUN_22.v += 0.4*time;}//aber auch ohne kamera bewegung sieht dieser effekt gut aus
				if (mouse_force.y > 0 || mouse_force.y < 0) {LF_SUN_21.u += (camera.tilt*camera.tilt);LF_SUN_22.u += (camera.tilt*camera.tilt);} 
					else {LF_SUN_21.u -= 0.1*time;LF_SUN_22.u -= 0.1*time;}
				LF_SUN_21.roll = camera.pan*10;LF_SUN_22.roll = camera.pan*10;

				//färbe view entitys ein. damit spart man unendlich viele targa bilder die von der form eh gleich aussehen. * * * * *
				//save a lot of targa files by colouring them. (if the shape of them are similar)
				vec_set(LF_SUN_11.blue,vector(10,200,220));vec_set(LF_SUN_12.blue,vector(50,220,250));vec_set(LF_SUN_13.blue,vector(0,180,25));//vector(blau,grün,rot)
				vec_set(LF_SUN_14.blue,vector(100,20,80));vec_set(LF_SUN_15.blue,vector(200,35,140));vec_set(LF_SUN_16.blue,vector(80,5,50));//vector(blue/green/red)
				vec_set(LF_SUN_17.blue,vector(120,60,10));vec_set(LF_SUN_18.blue,vector(200,20,40));vec_set(LF_SUN_19.blue,vector(200,20,40));
				vec_set(LF_SUN_20.blue,vector(180,250,45));

				//stelle alpha haupt-wert 'langsam' wieder auf 100% nach einem hindernis. * * * * * 
				//bring the master-alpha value to 100% after an obstacle
				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = 100;my.flag1 = 0;}}	
			}

			//frag nach ob diese lichtquelle "lens-dust-effekte" hat. LENS-DUST-FLARES ACTIVE?
			if (my.flag8 == 1) 
			{
				//PS: my.skill70 geht zwischen -800 bis +800; y-wert geht von -600 bis +600. die werte LF_axisRL & LF_axisUD sind aber alle positiv und gehen von 0 - 1600,
				//respektive (..axisUD) 0 - 1200. deshalb addieren wir my.skill70+800!! in der funktion wird's dann einfacher nachzufragen, ob sich der hauptflare 
				//in der nähe des "dust-flares" befindet um ihn aufzuhellen mit haupt-flare.alpha + seiner farbe (skill2-4)
				//PS: the value of skill70 goes between minus800 - +800. skill71 = -600 - +600. but the lens-dust-flare values LF_axisRL & LF_axisUD are only positiv values,
				//from 0 - 1600 and 0-1200 (sreen limit video_mode!!!) therefore we add skill70 & 71 with +800 & + 600.
				my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;//kopiere haupt.flare.position (die der sonne) auf skill60 & 61 (x & y. kein z!)
				//now copy my position (skill70 with + 800...) in my new skill60. give this values to the lens-dust-flares..
			}
		}
		if (sun_start == 0 && LF_SUN_1a.visible == on)//sonne nicht aktiv in dieser gegend, blende alle flares aus. DEACTIVATE FLARES (switch: sun_start == 0)
		{
			my.skill90 = 100;my.skill91 = 100;my.skill92 = 100;
			LF_SUN_1a.visible = off; LF_SUN_1b.visible = off;LF_SUN_2.visible = off;LF_SUN_3.visible = off;LF_SUN_4.visible = off;LF_SUN_5.visible = off;
			LF_SUN_6.visible = off;LF_SUN_7.visible = off;LF_SUN_8.visible = off;LF_SUN_9.visible = off;LF_SUN_10.visible = off;LF_SUN_11.visible = off;
			LF_SUN_12.visible = off;LF_SUN_13.visible = off;LF_SUN_14.visible = off;LF_SUN_15.visible = off;LF_SUN_16.visible = off;LF_SUN_17.visible = off;
			LF_SUN_18.visible = off;LF_SUN_19.visible = off;LF_SUN_20.visible = off;LF_SUN_21.visible = off;LF_SUN_22.visible = off;
			lens_dust_flares_REMOVE();//auch MEINE generierten lens-dust-flares werden eliminiert, spart speicher. 		LENS-DUST-FLARES BYE BYE TOO..
		}
		wait(1);
	}   
}
///////////////////////////////////

//fenster mit lens-dust-effekte, aber OHNE lens-flares!!
//simuliere ein durchsichtiges fenster, dass in einem dunklen raum steht. bei diesem starken lichtkontrast kann man die "dreckige" linse erkennen, staub und andere 
//flecken werden sichtbar. die drei spalten an der wand haben zusätzlich radius (skill5), intensität des aussenlichtes (skill5) & farbe des aussenlichtes (skill2-4)
//BSP: eine blau/rote lichtsirene könnte in der nacht beide farbflecken auf der linse sichtbar machen.
//WINDOWS only with lens-dust-flares, but no lens-flares!
//simulate a transparent bright window in a dark room. with this hard contrast you can see, in most cases, the dust-flares, the dirt on the camera lenses. the radius 
//skill5 determines the influence position, where dust-flares become visible. (experiment with this value). also nice is the colour that you can put (and change during
//game) with the skills 2-4. any lightsource creates his own dust-flares! (hello frame rate!!) any lightsource can therefore not only controll his own alpha value 
//but also his own colour. think about a police car in action with 2 different warning lights

action windowA
{
//skill1 distanz aktivator von kamera zu meiner position. die sonne hat kein distanzaktivator wird von der action "event_triggers" ein/ausgeschaltet
//skill2,3,4: = farbkode (blau/grün/rot) [wird normalerweise für die lens-dust-effekte verwendet, kann aber auch zum färben der lichtquelle benützt werden]
//skill5: radius der lens-dust-effekte. in dieser zone sollte man dann die dirt-flares sehen können. ps: aktiviere flag8 für lens-dust-effekte!
//skill6: max alphawert der dustflares. dieser alphawert ist nicht mit dem hauptflare alphawert zu verwechseln. 
//bsp: bei meiner sonne behält der hauptflare immer noch ein mindest alphawert, wenn die kamera aussersicht ist (oder hindernisse auftreten). dasselbe gilt..
//...auch für fenster-flare. im gegensatz zu den dustflares die dann bei hindernissen oder ausserhalb kamerasicht, komplett auf 0 abgefadet werden müssen!...
//skill7: maximalALPHAwert der lichtquelle, bzw, der fensterscheibe, die kann auch tiefer sein als die dustflares!
//skill8 ID's der lichtquellen. jede lichtquelle MUSS eine andere id haben!
//skill9 max alpha wert für die aura des lens-dust-fx. die sollte kleiner sein als max wert des skill6 und noch viel kleiner wenn mehrere lichtquellen zusammen stehen..
//...sonst könnte das bild übersteuern, zu hell werden!
//PS: skill1-9 daten müssen im WED eingegeben werden!
//skill24-59; 80-89; 93-99; können für diverse zwischenspeicherungen genutzt werden...
//skill21: distanz fader für distanzaktive lichtquellen. bei der sonne MUSS my.skill21 = 100; gesetzt werden!
//skill22,23: alpha distanzwert für lens-dust-effekte
//skill60: positions ermittlung für lens-dust effekt, damit deren alpha wert eingestellt werden kann. ist nicht gleich wie skill70
//skill65-68 wenn die kamera direkt in die lichtquelle zeigt, findet bei gewissen lichtquellen eine zusätzliche aufhellung statt (oder andere spez. fx)
//skill70 kopiere meine position auf skill70 um alle lens-flares zu positionieren
//skill90: zusätzlicher alphafader falls hindernisse vor kamera und hauptflare auftreten oder hauptflare ausserhalb kamerasicht fällt
//skill91 & 92: werte zwischenspeicherung, falls die flares ausserhalb der kamerasicht gelangen wird alpha auch abgefadet. ("nimm immer den kleineren wert an")
//skill100: hindernisse beim tracen festgestellt.
//--flag1: schalter. hauptflare wurde komplett abgefadet. wenn dann kein hindernis mehr vorhanden ist und my.flag1 = 1 ist, dann blende flare(s) wieder ein.
//flag2: für distanzaktive leuchtquellen, ist ein/aus schalter der seine flares generiert und diese dann wieder eliminiert bei distanz (skill1)
//--flag8: diese lichtquelle produziert "lens-dust-effekte".

//SKILL USAGE:
/*
skill1: distance activator from camera and my position. the sun has no ditance active event. she will be activatet with a trigger/switch (action "event_triggers")
skill2-4: colour code (blue/green/red) used for lens-dust-flares coloration. (or other purposes)
skill5: the radius of the lens-dust-flares where the lightsource influences the dust-flares. (alpha) dont forget to switch flag8 if you want lens-dust-fx on a lightsource
skill6: max. alphavalue of the dust-flares. its not the same alpha value of the lightsource! the lightsource can be stronger while the dust-flares are weaker. 
skill7: max. alpha value of the lightsource.
skill8: unique id of the lightsource. any lightsource MUST have an unique id! (error message!)
skill9: max. alpha value for the aura of the primary lens-dust-flare (round big one). if you have more than one lightsource with active lens-dust-flares, it can happen 
			that the	screen appears too bright, so it's a good thing to lower the value for all surrounding lightsource with active lens-dust-flares.
PS: put the skill1-9 values in WED on all lightsources
skill24-59 & 80-89 & 93-99 can be used for various other purposes.
skill21: distance activating/regulating value to check the max-min alpha value. put 100 on lightsources like the sun!
skill22,23: regulation of the alpha value (lens-dust-flares)
skill65-68: show some effects if the camera turn exactly in the middle of the lightsource (like brighten up the screen)
skill70-72: copy my position to the lens-flare position
skill90: if there are some obstacles in front of the lightsource, or the camera goes off-screen there will be a fade out of the alpha value
skill91,92: save some values in this skills (off-screen)
skill100: obstacles while traced
flag1: switch on/off: activate in case of obstacles
flag2: only for distance active lightsources. SWITCH to initialize the used lens-flares. 
flag8: this lightsource is using lens-dust-flares. (check it ON, in WED)
*/

	my.passable = on;my.bright = on; my.ambient = 100;my.albedo=-100;my.transparent = on;	
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha=my.skill7;
	my.pan = my.pan+0.01;//PAN-wert: sonst dreht sich der flare stehts in richtung der kamera. ja nicht pan = 0 stellen! SET HIS PAN TO 0.01 NOT 0 OR HE WILL TURN ARROUND
	var my_radius;my_radius = my.skill5;var my_radTEMP1;
	while(1)
	{	
		my.alpha = my.skill25;//alpha wert des fensters ist nicht gleich alphawert der lens-dust!
		//don't forgett MAX alpha value of the window is not the same of the lens-dust value. he can be lesser.
		my.skill21 = ((100/my.skill1)*vec_dist(my.x, camera.x));//zwischenspeicherung für den alpha wert des "windows"
		my.skill25 = (my.skill7/100)*my.skill21;//limitiere alpha max-wert auf den anegegebenen skill7 wert (bei maximaler entfernung zum fenster)
		//you have to experiment with all this values! i want to change the alpha value in dependence of: distance, off-screen and obstacles...
		my.skill24 = 100-((100/my.skill1)*(vec_dist(my.x, camera.x)));//der dust-lens-fx sollte aber ("meiner meinung") erst ab einer gewissen distanz sichtbar werden. 
		my.skill23 = (100/my.skill7)*my.skill90;//1.) max alpha wert * hindernisse oder ausser kamerasicht berechnen.
		//i wanted to fade out the lens-dust-flares if you come closer to the lightsource (window). i think that the iris of the camera opens widely if you are far away
		//from a lightsource (dark room) and therfore more lens-dust-flares become visible. but if you go closer to the lightsource (< 301) the iris of the cam. is 
		//closing, so the dust-flares must fade out. (but of course it's up to you to make that decision....) 
		//we put a value of 50 in addition to this value so the lens-dust-flares will fade-out earlier, 50 quants, in front of the window. 
		//see: "my.skill26 = (100/250)*(ve..." (300[=influence distance]-250 = 50)
		my.skill22 = ((my.skill7/100)*my.skill24)*(my.skill23/100)*(my.skill24/100)*(my.skill26/100);//2.)alphawert des dustflares in abhängigkeit von ausserkamerasicht + 
		//distanz berechnen + abzug wenn man zu nahe an der lichtquelle kommt....dann sollten die dust-flares langsam abfaden. in diesem fall ab 300 quants...
		//skill22 is a MAX alpha value for the lens-dust-flares (distance, off-screen & obstacles dependent calculation)
		if (vec_dist(my.x, camera.x) < 301) {my.skill26 = (100/250)*(vec_dist(my.x, camera.x)-100);my.skill27 = 100/my.skill26;} else {my.skill26 = 100;my.skill27 = 1;}
		//damit aber die flares nicht gerade erst vor der nase der lichtquelle auf 0 abfaden, stellen wir den wert auf 250 (50 quants vorher!) [..100/250)*(vec_..]
		//zusätzlich potenzieren wir auch noch den radius ab dieser distanz, damit er grösser wird wenn man sehr nahe kommt (skill27)
		my.skill5=(my_radius/100)*(my.skill24*my.skill27);//dust-lens-fx-radius = distanzabhängig, je näher desto grösser
		//we extend the radius in addition when we come closer to the lightsource too! (skill27) (see the difference if you cut/erase this value)
		
		//PS: die distanz (skill1) kann vergrössert werden falls man in einem zimmer eintritt wo der lens-dust-effekt bereits stark sein sollte, oder man gibt ein max 
		//wert ein der ab einer gewissen nähe abfadet (ändere dann den skill26 wert, statt 301 auf 151 setzen.) wenn man näher an der lichtquelle kommt, öffnet sich die 
		//iris der kamera so stark, dass die lens-dust-effekte kaum noch sichtbar sind. wer das lieber nicht haben möchte, kann obige funktion 
		//"if (vec_dist(my.x, camera.x) < 301) {... auslöschen.
		//of course you have to experiment with all this values. skill1 distance activation. maybe you want a strong lens-dust-effect when you enter in a room. 
		//then put skill22 to a value of 90-100. (but don't forget off-screen values & obstacles -> skill90!!  my.skill22 = 100*(my.skill90/100); )
	
		vec_set(my.skill70, my.pos);

		if (vec_dist(my.x, camera.x) < my.skill1)//distanz aktive action
		{
			if (my.flag2 == 0)//aktiviere/initialisiere nur einmal! (wenn entfernt zur kamera, dann wird ein reset durchgeführt und die flares eliminiert.)	
			{//initialize only once. if the camera leave the influence zone (skill1) then it will eliminate all flares and make a reset
				lens_dust_flares_INIT();	my.flag2 = 1;//generiere nun ALLE lens-dust-flares
			}
			LF_tracer();

			my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				if (my.flag8 == 1) {lens_dust_flares_ALPHA();}
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }

				//hauptflare bewegt sich langsam ausserhalb der kameraposition, fadeout flares * * * * *
				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}
				
				//stelle alpha haupt-wert 'langsam' wieder auf 100% nach einem hindernis. * * * * * 
				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}
		if (my.flag8 == 1) {	my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;	}

		//zu weit entfernt von der lichtquelle. BYE BYE & RESET
		if ((vec_dist(my.x, camera.x) > my.skill1) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha=my.skill7;
			lens_dust_flares_REMOVE();//(MEINE) keierten lens-dust-flares jetzt eliminieren!. ELIMINATE MY CREATED DUST_LENS_FLARES too
		}
		wait(1);
	}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
material mat_dark   
{ //für dunkle entitys (leuchtreklamen). FOR DARK ENTITYS (ACTION "LEUCHTREKLAME")
	ambient_blue = 0;
	ambient_green = 0;    
	ambient_red = 0;    
	diffuse_blue = 100;    
	diffuse_green = 100;    
	diffuse_red = 100;    
	specular_blue = 200;    
	specular_green = 200;    
	specular_red = 200;    
	power = 10;  
}
//															 * * * * * * * A-L-T-E-R-N-A-T-I-V * * * * * * * *


function InitializeLF_A_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indx[LF_number]); LF_pointer = ent_createlayer("LF_10grp1.tga",0,5);
   LF_indx[my.skill8] = handle(LF_pointer);   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 7;LF_pointer.scale_y = 7;
   //färbe diese "view entitys" ein. damit spart man unendlich viele targa bilder die von der form eh gleich aussehen. * * * * *
   //now with the id of the lightsource you can colour some flares that have the same shape
   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(10,180,40));}//"pi" von pizza, flare färben lassen
   if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector(200,200,200));}//"z" 
   if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector(100,100,250));}//"za"
   LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));//PS: es gibt LF_Place; LF_PlaceX und LF_PlaceXY!
   //je nachdem ob sich der flare zusätzlich rechts/links oder sogar rauf/runter bewegen wird kommt hier eine andere funktion + zusätzliche variablen angaben vor.
   //siehe define LF_axPIVrl;define LF_axPIVud; das sind die skills der generierten flares die auch manipuliert werden können um die skills der action zu verschonen...
   //there are the function LF_Place; LF_PlaceX and LF_PlaceXY that control the movement of the flares in their respective axis in addition to the 'normal' lens-
   //flares movement. see define LF_axPIVrl;define LF_axPIVud, the skills of the created flares (so you don't have to use the skills of the lightsource)
}
function AlphaControl_A_lightTYPE5(LF_number)
{	//kontrolliere/ändere die alpha des flares, ausserhalb der kamerasicht? hindernisse? distanz zur lichtquelle? (erster wert = maximal Alphawert! skilll21 = distanz; 
	//...skill90 = kamerasicht ausserhalb? dann abfaden lassen [oder bei hindernissen komplett abfaden])
	//control/change the alpha value of the flare. depends on: off-screen camera; obstacles & distance. first value ist the max. of the alphavalue. skill21 = distance- 
	//fader, skill90 = off-screen or obstacles value.
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer.alpha = ((my.skiLL66/100)*my.skill90)*(my.skill40/100);//skill40 ist eine art masteralpha zum abfaden
   //falls die lichtquelle ein/ausschaltet wie eine art alarmanlage, oder in diesem fall eine leuchtreklame die am ende langsam abfadet.
   //in this case i have used skill40 as a kind of master-alpha-fader, a switch on/off or just as master fader (dimmer)
   LF_pointer.alpha = min(50, (max(LF_pointer.alpha, 0)));//max/minimaler alpha wert! 	LIMIT THE ALPHAVALUE
   LF_pointer.LF_temp1 = LF_pointer.alpha;//speichere seinen letzten alpha wert auf dem skill der flare (define: ..LFtemp1), damit dieser wert, bei hindernissen oder
   //kamera aussersicht, geanuer abgefgadet werden kann.
   //(don't know why), but i think sometimes it's better to save the last alpha value (obstacle in my way...) to make a better fadeout. i used the skill of the flare 
   //(define: ..LFtemp1) to do that. store it and change it in the function AlphaFadeout_A_lightTYPE...
}
function AlphaFadeout_A_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);
}
function Remove_A_lightTYPE5(LF_number)
{	//eliminiere flares die ausserhalb der reichweite der lichtquelle sind (speicherplatz sparen). 
	//ELIMINATE FLARES IF YOU GO OUTSIDE THE RANGELIMIT (skill1) OF THE LIGHTSOURCE
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   ent_remove(LF_pointer); 
}
		//*********-------
function InitializeLF_B_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_pointer = ent_createlayer("LF_10grp2.tga",0,5);   LF_indxB[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 5;LF_pointer.scale_y = 8;LF_pointer.LF_axPIVrl=-0.5;	LF_pointer.alpha = 0;
}
function PlaceLF_B_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_PlaceX(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_B_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_pointer.alpha = ((80/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);//skill24 ist wie skill21, eine...
   LF_pointer.LF_temp1 = LF_pointer.alpha;//...distanz speicherung zur kamera minus 90. (siehe die action leuchtreklame) 
   //je näher man kommt, desto stärker wird die alpha. experimentiere mit wert 80. oder erstelle bei der action, neue skills für flares die bereits im voraus sichtbar 
   //sein müssen.
   //skill24 is like skill21 an aditional distance value from me and the camera position(-90 quants, see the action leuchtreklame). the closer you go, the stronger is
   //the alphavalue, but maybe you have to experiment with this value.
}
function AlphaFadeout_B_lightTYPE5(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxB[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_B_lightTYPE5(stretch)
{	//zusätzliche spezielle effekte für die flares. in diesem fall hier, wird die flare gedehnt wenn sich kamera pan bewegt
	//aditional effect with this flare: stretch it in dependence of the camera pan/tilt
	LF_pointer = ptr_for_handle(LF_indxB[stretch]);			LF_pointer.scale_x = 5 + abs(my.skill70/100);
}
function Remove_B_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_C_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_pointer = ent_createlayer("LF_10grp3.tga",0,5);   LF_indxC[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1.2;LF_pointer.scale_x = 5;LF_pointer.scale_y = 5;LF_pointer.LF_axPIVrl = 1;LF_pointer.LF_axPIVud = 1;	LF_pointer.alpha = 0;
   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(0,200,0));}//"pi" von pizza, flare färben lassen
   if (my.skill8 == 15) {vec_set(LF_pointer.blue,vector(230,200,200));}//"z" 
   if (my.skill8 == 16) {vec_set(LF_pointer.blue,vector(50,50,250));}//"za"
   if (my.skill8 == 17) {vec_set(LF_pointer.blue,vector(150,80,5));}//i-punkt. colour the point that stays over the "i" of "pizza"
}
function PlaceLF_C_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_C_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_pointer.alpha = ((35/100)*my.skill90)*my.skill30*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_C_lightTYPE5(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxC[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_C_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);			LF_pointer.scale_x = abs(my.skill70/100)+abs(my.skill71/65);	LF_pointer.scale_y = LF_pointer.scale_x;
	LF_pointer.roll = my.skill55-(my.skill55*2);					my.skill30 = LF_pointer.scale_x/2; 	
}
function Remove_C_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_D_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_pointer = ent_createlayer("LF_10grp4.tga",0,6);   LF_indxD[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 1;LF_pointer.scale_y = 7;	LF_pointer.alpha = 0;
}
function PlaceLF_D_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_D_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_pointer.alpha = ((50/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_D_lightTYPE5(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxD[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_D_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);			LF_pointer.scale_x = 0.01 + abs(my.skill70/5);//langer schmaler, rosa flare wird sehr dick ausserhalb cam.
	//this flare is a long, thin, pink pic. it will get thicker if camera goes off-screen.
	//spezial effekt wenn kamera bewegt wird, GESCHMACKSACHE... dieser effekt soll nur zeigen, was man so alles machen könnte mit lens-flares.
	//another cool effect. if you move the camera (pan/tilt) this pic will randomly make some coulor effects in adition.
	if (mouse_force.x > 0 || mouse_force.x < 0 || mouse_force.y > 0 || mouse_force.y < -25)//seitliche (grüne) linien, flimmern bei bewegung der cam.
	{
	   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(0,(180+random(20)),(50+random(100))));}//"pi" von pizza
	   if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector((100+random(50)),(50+random(50)),(100+random(50))));}//"z" 
	   if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector((50+random(50)),10,(150+random(50))));}//"za"
   }
}
function Remove_D_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_E_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_pointer = ent_createlayer("LF_10grp4.tga",0,6);   LF_indxE[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 1;LF_pointer.scale_y = 7;	LF_pointer.alpha = 0;		LF_pointer.LF_axPIVrl=1;
}
function PlaceLF_E_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_PlaceX(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_E_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_pointer.alpha = ((my.skill28/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_E_lightTYPE5(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxE[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_E_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);		LF_pointer.scale_x = 0.01 + abs(my.skill70/30);LF_pointer.scale_y = 0.3 + abs(my.skill70/50);
	//spezial effekt wenn kamera bewegt wird
	if (mouse_force.x > 0 || mouse_force.x < 0 || mouse_force.y > 0 || mouse_force.y < -25)
	{
		my.skill28 = random(abs(my.skill70))/7;my.skill29 = random(abs(my.skill70))/7;//alpha effekte für lange, schmale linien. AND SOME ALPHA EFFECTS FOR THE THIN LINES
	   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(0,(60+random(100)),50));}//"pi" von pizza
	   if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector((100+random(30)),(100+random(30)),(100+random(30))));}//"z" 
	   if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector((50+random(30)),10,(150+random(30))));}//"za"
   }
}
function Remove_E_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_F_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_pointer = ent_createlayer("LF_10grp4.tga",0,6);   LF_indxF[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 1;LF_pointer.scale_y = 7;	LF_pointer.alpha = 0;		LF_pointer.LF_axPIVrl=-1;
}
function PlaceLF_F_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_PlaceX(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_F_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_pointer.alpha = ((my.skill29/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_F_lightTYPE5(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxF[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_F_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);		LF_pointer.scale_x = 0.01 + abs(my.skill70/30);LF_pointer.scale_y = 0.3 + abs(my.skill70/50);
	//spezial effekt wenn kamera bewegt wird
	if (mouse_force.x > 0 || mouse_force.x < 0 || mouse_force.y > 0 || mouse_force.y < -25)
	{
		my.skill28 = random(abs(my.skill70))/7;my.skill29 = random(abs(my.skill70))/7;
	   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(0,(60+random(100)),50));}//"pi" von pizza
	   if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector((100+random(30)),(100+random(30)),(100+random(30))));}//"z" 
	   if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector((50+random(30)),10,(150+random(30))));}//"za"
   }
}
function Remove_F_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_G_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxG[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -1;LF_pointer.scale_x = 7;LF_pointer.scale_y = 7;	LF_pointer.alpha = 0;	 
	if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(100,30,100));}//"pi" von pizza
	if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector(200,170,150));}//"z" 
	if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector(70,40,200));}//"za"
	if (my.skill8 == 17) {vec_set(LF_pointer.blue, vector(200,90,20));}//"i"-punkt
}
function PlaceLF_G_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_G_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/18)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_G_lightTYPE5(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_G_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_H_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxH[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.7;LF_pointer.scale_x = 4;LF_pointer.scale_y = 4;	LF_pointer.alpha = 0;	 
	if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(70,20,10));}//"pi" von pizza
	if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector(130,160,10));}//"z" 
	if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector(120,30,160));}//"za"
	if (my.skill8 == 17) {vec_set(LF_pointer.blue, vector(120,150,5));}//"i"-punkt
}
function PlaceLF_H_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_H_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/9)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_H_lightTYPE5(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_H_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_I_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxI[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.3;LF_pointer.scale_x = 2;LF_pointer.scale_y = 2;	LF_pointer.alpha = 0;	 
	if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(10,60,20));}//"pi" von pizza
	if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector(200,10,0));}//"z" 
	if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector(15,5,200));}//"za"
	if (my.skill8 == 17) {vec_set(LF_pointer.blue, vector(200,25,5));}//"i"-punkt
}
function PlaceLF_I_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_I_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/16)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_I_lightTYPE5(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_I_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);  ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_J_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_pointer = ent_createlayer("LF_10grp4.tga",0,3);   LF_indxJ[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -1;LF_pointer.scale_x = 5;LF_pointer.scale_y = 1;	LF_pointer.alpha = 0;	 
}
function PlaceLF_J_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_J_lightTYPE5(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/3)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function SpecialFX_J_lightTYPE5(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);		LF_pointer.scale_x = 4 + abs(my.skill70/10);LF_pointer.scale_y = 2 + abs(my.skill70/40);
	LF_pointer.roll = my.skill55-(my.skill55*2)+90;
	//spezial effekt wenn kamera bewegt wird
	if (mouse_force.x > 0 || mouse_force.x < 0 || mouse_force.y > 0 || mouse_force.y < -25)
	{
		my.skill28 = random(abs(my.skill70))/7;my.skill29 = random(abs(my.skill70))/7;
	   if (my.skill8 == 14) {vec_set(LF_pointer.blue, vector(0,(180+random(20)),(50+random(100))));}//"pi" von pizza
	   if (my.skill8 == 15) {vec_set(LF_pointer.blue, vector((100+random(50)),(50+random(50)),(100+random(50))));}//"z" 
	   if (my.skill8 == 16) {vec_set(LF_pointer.blue, vector((100+random(50)),10,(200+random(50))));}//"za"
   }
}
function AlphaFadeout_J_lightTYPE5(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_J_lightTYPE5(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);  ent_remove(LF_pointer); }


//SPEZIELL FÜR DAS I-PÜNKTCHEN (andere flares + funktionen)......
//SPECIAL EFFECTS & NEW FUNCTIONS/FLARES FOR THE 'i'-POINT OF "PIZZA"
function InitializeLF_A_lightTYPE6(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer = ent_createlayer("LF_10grp1.tga",0,5);   LF_indx[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 5;LF_pointer.scale_y = 5;   vec_set(LF_pointer.blue, vector(250,100,100));   LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));	}
function AlphaControl_A_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   		LF_pointer.alpha = ((my.skiLL66/100)*my.skill90)*(my.skill40/100);
   LF_pointer.alpha = min(40, (max(LF_pointer.alpha, 0)));  LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_A_lightTYPE6(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);}
function Remove_A_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_B_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);  	LF_pointer = ent_createlayer("LF_10grp5.tga",0,5);   LF_indxB[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;									LF_pointer.alpha = 0;
}
function PlaceLF_B_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_B_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_pointer.alpha = ((35/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_B_lightTYPE6(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxB[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_B_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);		LF_pointer.scale_x = 0.01 + abs(my.skill70/70);		LF_pointer.scale_y = 1 + abs(my.skill70/80);
}
function Remove_B_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_C_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_pointer = ent_createlayer("LF_10grp4.tga",0,5);   LF_indxC[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;		vec_set(LF_pointer.blue,vector(150,80,5));	LF_pointer.alpha = 0;
}
function PlaceLF_C_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_C_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_pointer.alpha = ((100/100)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_C_lightTYPE6(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxC[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_C_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);			LF_pointer.scale_x = 10 + abs(my.skill70/5);	LF_pointer.scale_y = 10;
}
function Remove_C_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_D_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_pointer = ent_createlayer("LF_10grp6.tga",0,6);   LF_indxD[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.1; 						 LF_pointer.alpha = 0;
}
function PlaceLF_D_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_D_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_pointer.alpha = ((40/100)*my.skill90)*my.skill30*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_D_lightTYPE6(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxD[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_D_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);		LF_pointer.scale_x = 0.1 + abs(my.skill31/120);
	my.skill30 = LF_pointer.scale_x/8; 							LF_pointer.roll = my.skill55-(my.skill55*2)+180;//skill30-wert der action wird jetzt hier verarbeitet!
}
function Remove_D_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_E_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_pointer = ent_createlayer("LF_10grp7.tga",0,6);   LF_indxE[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;	LF_pointer.alpha = 0;
}
function PlaceLF_E_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_E_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_pointer.alpha = ((50/100)*(my.skill30+my.skill32)*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_E_lightTYPE6(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxE[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_E_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);		LF_pointer.scale_x = 1 + abs(my.skill31/300);LF_pointer.scale_y = 1 + abs(my.skill31/300);
	LF_pointer.roll = my.skill55-(my.skill55*2)-45;
	if (mouse_force.x > 0 || mouse_force.x < 0 || mouse_force.y > 0 || mouse_force.y < 0)	{my.skill32 = random(my.skill30/2);}
}
function Remove_E_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_F_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_pointer = ent_createlayer("LF_10grp8.tga",0,6);   LF_indxF[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 2.7;	LF_pointer.alpha = 0;	vec_set(LF_pointer.blue,vector(100,160,10));		LF_pointer.LF_axPIVrl=-2;LF_pointer.LF_axPIVud=-2;
}
function PlaceLF_F_lightTYPE6(LF_number) { LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72)); }
function AlphaControl_F_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_pointer.alpha = ((20/100)*my.skill30*my.skill90)*(my.skill24/100)*(my.skill40/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_F_lightTYPE6(LF_number) 	{	 LF_pointer = ptr_for_handle(LF_indxF[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function SpecialFX_F_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);		LF_pointer.scale_x = 0.1 + abs(my.skill31/350);LF_pointer.scale_y = 0.1 + abs(my.skill31/350);
	LF_pointer.roll = my.skill55-(my.skill55*2);				LF_pointer.LF_axPIVrl=-(2+abs(my.skill31/500));LF_pointer.LF_axPIVud=-(2+abs(my.skill31/500));
}
function Remove_F_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_G_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxG[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -1;LF_pointer.scale_x = 7;LF_pointer.scale_y = 7;	LF_pointer.alpha = 0;	 vec_set(LF_pointer.blue, vector(200,90,20));
}
function PlaceLF_G_lightTYPE6(LF_number) { LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72)); }
function AlphaControl_G_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/18)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_G_lightTYPE6(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_G_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_H_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxH[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.7;LF_pointer.scale_x = 4;LF_pointer.scale_y = 4;	LF_pointer.alpha = 0; vec_set(LF_pointer.blue, vector(120,150,5));
}
function PlaceLF_H_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_H_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/9)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_H_lightTYPE6(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_H_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_I_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_pointer = ent_createlayer("LF_sunI.tga",0,2);   LF_indxI[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.3;LF_pointer.scale_x = 2;LF_pointer.scale_y = 2;	LF_pointer.alpha = 0; vec_set(LF_pointer.blue, vector(200,25,5));
}
function PlaceLF_I_lightTYPE6(LF_number) {	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_I_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_pointer.LF_maxALPHA = (abs(my.skill70)/16)*(my.skill24/100);
   LF_pointer.alpha = (LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill40/100);		LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_I_lightTYPE6(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_I_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);  ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_J_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_pointer = ent_createlayer("LF_10grp8.tga",0,3);   LF_indxJ[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 2.7;	LF_pointer.LF_axPIVrl=-2;LF_pointer.LF_axPIVud=-2;LF_pointer.alpha = 0;	vec_set(LF_pointer.blue,vector(100,10,0));
}
function PlaceLF_J_lightTYPE6(LF_number) { LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));}
function AlphaControl_J_lightTYPE6(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_pointer.alpha = ((50/100)*my.skill30*my.skill90)*(my.skill24/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function SpecialFX_J_lightTYPE6(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);		LF_pointer.scale_x = 0.01 + abs(my.skill31/1000);LF_pointer.scale_y = 0.01 + abs(my.skill31/1000);
	LF_pointer.roll = my.skill55-(my.skill55*2);				LF_pointer.LF_axPIVrl=-(2+abs(my.skill31/2000));LF_pointer.LF_axPIVud=-(2+abs(my.skill31/2000));
}
function AlphaFadeout_J_lightTYPE6(LF_number) 	{	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);  LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90);	}
function Remove_J_lightTYPE6(LF_number) 			{	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);  ent_remove(LF_pointer); }


action leuchtreklame
{
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;//stelle diese anfangswerte ein für alpha fadeout. INITIAL VALUES
	var my_radius;my_radius = my.skill5;var my_radTEMP1;	my.material = mat_dark;var my_temp2[2];var my_color;var my_SW;
	//my.skill40 --- ist eine art ***masteralpha*** zum abfaden falls die lichtquelle ein/ausschaltet wie eine art alarmanlage, oder in diesem fall eine leuchtreklame 
	//die EIN/AUS-schaltet und dann am ende langsam abfadet.
	//skill40 is a kind of master alpha, to switch on/off or dimm the light + lens-dustflares-alpha!
	
	while(1)
	{	
		my.skill21 = (((100/my.skill1)*vec_dist(my.x, camera.x)));//für den alpha wert der flares je nach distanz der lichtquelle zur kamera
		//diverse zwischenspeicherungen damit man den alphawert der dust-lens-fx vermitteln kann:
		//skill22-24 can be used to calculate the alpha value of the lens-dust-flares. (distance to camera, obstacles, off-screen values)....
		my.skill24 = 90-((100/my.skill1)*(vec_dist(my.x, camera.x)));//1.) distanz check [experimentiere mit diesen werten]. falls gewisse flares früher sichtbar sein
		//sollten, dann muss man eine zusätzliche skill verwenden, so wie skill24 und dann auch den vorderen wert ändern (bsp: statt 90, 150 eingeben oder kleiner....)
		my.skill23 = (100/my.skill7)*my.skill90;//2.) alpha wert * hindernisse oder ausser kamerasicht berechnen.
		my.skill22 = ((my.skill7/100)*(my.skill24+200))*(my.skill23/100)*(my.skill24/100)*(my.skill26/100)*(my.skill40/100);//RESULTAT, gib diesen wert den dust-flares 
		//weiter, zuzüglich abzug wenn man zu nahe an der lichtquelle kommt....dann sollten die dust-flares langsam abfaden. in diesem fall ab 300 quants... (+ skill26)
		//PS: die lens-dust-flares hängen NUN auch vom master alpha (skill40) ab. man kann deren alpha auch so manipulieren (bei lichtquellen die abfaden)
		//as i did in the action windows i use to fade out dust-flares when you go to close to the lightsource ( < 301), the same with the radius (skill5), makes it bigger, 
		//the closer you go. even the dust-flares depends now from the masteralpha value (skill40) and of course of all the other obstacles/off-screen...values!
		if (vec_dist(my.x, camera.x) < 301) {my.skill26 = (100/250)*(vec_dist(my.x, camera.x)-100);} else {my.skill26 = 100;}

		//radius der lens-dust-flares [experimentiere mit skill5 wert, klein (min.250) = kleine leuchtquelle. kleiner lohnt sich jedoch nicht!]
		my.skill5=(my_radius/100)*(my.skill24);//dust-lens-fx-radius = distanzabhängig, je näher desto grösser der radius
		vec_set(my.skill70, my.pos);//dont make the radius (skill5) smaller than 250 in WED (for lens-dust-flares)

		if (vec_dist(my.x, camera.x) < my.skill1)
		{
		//NUR "pi" von pizza kontrolliert den counter für die steuerung der leuchtreklame
		//the "pi" of pizza controls the counter to steer this action ("neon sign")
		if (my.skill8 == 14) {leuchtreklameCOUNTER += 1 * time; if (leuchtreklameCOUNTER > 525) {leuchtreklameCOUNTER = -25;}}
		
			if (my.flag2 == 0)
			{
				if (my.skill8 < 17)//lichtquelle von pizza, ohne i punkt!
				{
					InitializeLF_A_lightTYPE5(my.skill8);InitializeLF_B_lightTYPE5(my.skill8);InitializeLF_C_lightTYPE5(my.skill8);InitializeLF_D_lightTYPE5(my.skill8);
					InitializeLF_E_lightTYPE5(my.skill8);InitializeLF_F_lightTYPE5(my.skill8);InitializeLF_G_lightTYPE5(my.skill8);InitializeLF_H_lightTYPE5(my.skill8);
					InitializeLF_I_lightTYPE5(my.skill8);InitializeLF_J_lightTYPE5(my.skill8);
				}
				if (my.skill8 == 17)//i-punkt von pizza hat andere lensflares und deshalb andere funktionen!!! 
				//the "i"-point of "pizza" has other flares and also other functions
				{
					InitializeLF_A_lightTYPE6(my.skill8);InitializeLF_B_lightTYPE6(my.skill8);InitializeLF_C_lightTYPE6(my.skill8);InitializeLF_D_lightTYPE6(my.skill8);
					InitializeLF_E_lightTYPE6(my.skill8);InitializeLF_F_lightTYPE6(my.skill8);InitializeLF_G_lightTYPE6(my.skill8);InitializeLF_H_lightTYPE6(my.skill8);
					InitializeLF_I_lightTYPE6(my.skill8);InitializeLF_J_lightTYPE6(my.skill8);
				}
				if (my.flag8 == 1) {lens_dust_flares_INIT();}
				my.flag2 = 1;
			}
			LF_tracer();

			my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				if (my.skill8 < 17)
				{
					AlphaFadeout_A_lightTYPE5(my.skill8);AlphaFadeout_B_lightTYPE5(my.skill8);AlphaFadeout_C_lightTYPE5(my.skill8);AlphaFadeout_D_lightTYPE5(my.skill8);
					AlphaFadeout_E_lightTYPE5(my.skill8);AlphaFadeout_F_lightTYPE5(my.skill8);AlphaFadeout_G_lightTYPE5(my.skill8);AlphaFadeout_H_lightTYPE5(my.skill8);
					AlphaFadeout_I_lightTYPE5(my.skill8);AlphaFadeout_J_lightTYPE5(my.skill8);
				}
				if (my.skill8 == 17)//i-punkt von pizza
				{
					AlphaFadeout_A_lightTYPE6(my.skill8);AlphaFadeout_B_lightTYPE6(my.skill8);AlphaFadeout_C_lightTYPE6(my.skill8);AlphaFadeout_D_lightTYPE6(my.skill8);
					AlphaFadeout_E_lightTYPE6(my.skill8);AlphaFadeout_F_lightTYPE6(my.skill8);AlphaFadeout_G_lightTYPE6(my.skill8);AlphaFadeout_H_lightTYPE6(my.skill8);
					AlphaFadeout_I_lightTYPE6(my.skill8);AlphaFadeout_J_lightTYPE6(my.skill8);
				}
				if (my.flag8 == 1) {Lens_dust_flares_ALPHA();}
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				my_temp2[0] = (my.skill70 - my.skill70);my_temp2[1] = (my.skill71-my.skill71);		vec_set(my.skill50, my.skill70);
				vec_sub(my.skill50, my_temp2[0]); vec_to_angle(my.skill55, my.skill50);			//halbmond flare dreht um zentrum rum (siehe SpecialFX_D_lightTYPE5)
				//there is a "half-moon" flare with some special effects see the function SpecialFX_D_lightTYPE5
				if (abs(my.skill70) > abs(my.skill71)) {my.skill31= my.skill70;}if (abs(my.skill71) > abs(my.skill70)) {my.skill31= my.skill71;}
				if (my.skill8 < 17)
				{
					PlaceLF_A_lightTYPE5(my.skill8); 	AlphaControl_A_lightTYPE5(my.skill8);	
					PlaceLF_B_lightTYPE5(my.skill8); 	AlphaControl_B_lightTYPE5(my.skill8);	SpecialFX_B_lightTYPE5(my.skill8);
					PlaceLF_C_lightTYPE5(my.skill8); 	AlphaControl_C_lightTYPE5(my.skill8);	SpecialFX_C_lightTYPE5(my.skill8);
					PlaceLF_D_lightTYPE5(my.skill8); 	AlphaControl_D_lightTYPE5(my.skill8);	SpecialFX_D_lightTYPE5(my.skill8);
					PlaceLF_E_lightTYPE5(my.skill8); 	AlphaControl_E_lightTYPE5(my.skill8);	SpecialFX_E_lightTYPE5(my.skill8);
					PlaceLF_F_lightTYPE5(my.skill8); 	AlphaControl_F_lightTYPE5(my.skill8);	SpecialFX_F_lightTYPE5(my.skill8);
					PlaceLF_G_lightTYPE5(my.skill8); 	AlphaControl_G_lightTYPE5(my.skill8);	
					PlaceLF_H_lightTYPE5(my.skill8); 	AlphaControl_H_lightTYPE5(my.skill8);	
					PlaceLF_I_lightTYPE5(my.skill8); 	AlphaControl_I_lightTYPE5(my.skill8);
					PlaceLF_J_lightTYPE5(my.skill8); 	AlphaControl_J_lightTYPE5(my.skill8);	SpecialFX_J_lightTYPE5(my.skill8);
				}
				if (my.skill8 == 17)//i-punkt von pizza
				{
					PlaceLF_A_lightTYPE6(my.skill8); 	AlphaControl_A_lightTYPE6(my.skill8);	
					PlaceLF_B_lightTYPE6(my.skill8); 	AlphaControl_B_lightTYPE6(my.skill8);	SpecialFX_B_lightTYPE6(my.skill8);
					PlaceLF_C_lightTYPE6(my.skill8); 	AlphaControl_C_lightTYPE6(my.skill8);	SpecialFX_C_lightTYPE6(my.skill8);
					PlaceLF_D_lightTYPE6(my.skill8); 	AlphaControl_D_lightTYPE6(my.skill8);	SpecialFX_D_lightTYPE6(my.skill8);
					PlaceLF_E_lightTYPE6(my.skill8); 	AlphaControl_E_lightTYPE6(my.skill8);	SpecialFX_E_lightTYPE6(my.skill8);
					PlaceLF_F_lightTYPE6(my.skill8); 	AlphaControl_F_lightTYPE6(my.skill8);	SpecialFX_F_lightTYPE6(my.skill8);
					PlaceLF_G_lightTYPE6(my.skill8); 	AlphaControl_G_lightTYPE6(my.skill8);
					PlaceLF_H_lightTYPE6(my.skill8); 	AlphaControl_H_lightTYPE6(my.skill8);
					PlaceLF_I_lightTYPE6(my.skill8); 	AlphaControl_I_lightTYPE6(my.skill8);
					PlaceLF_J_lightTYPE6(my.skill8); 	AlphaControl_J_lightTYPE6(my.skill8);	SpecialFX_J_lightTYPE6(my.skill8);
				}

				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }

				//hauptflare bewegt sich langsam ausserhalb der kameraposition, fadeout flares * * * * * (OFF-SCREEN CAMERA? START FADEOUT)
				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}
				
				//camera zeigt voll in die lichtquelle, starke lichtaufhellung zeigen. (nur für gewisse flares)
				//look in the middle of the lightsource, then some special effects will appear.
				my.skiLL67 = abs(my.skill70);my.skiLL68 = abs(my.skill71);//dieser effekt ist erst ab einer gewissen distanz sichtbar. (skiLL65)
				//some flares will show their effect only in a certain distance to the camera position (skill65)
				if (my.skiLL67 > my.skiLL68) {my.skiLL66 = (100-my.skiLL67)*(my.skiLL65/100);}if (my.skiLL68 > my.skiLL67) {my.skiLL66 = (100-my.skiLL68)*(my.skiLL65/100);}
				if (vec_dist(my.x, camera.x) < 501) {my.skiLL65 = 500-vec_dist(my.x, camera.x);my.skiLL65=min(100,my.skiLL65);} else {my.skiLL65 = 1;}
				
				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}

			if (my.flag8 == 1) {	my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;	}

		//zu weit entfernt von der lichtquelle. BYE BYE FLARES
		if ((vec_dist(my.x, camera.x) > (my.skill1+10)) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha = my.skill7;my.lightrange = 0;my.skill40 = 100;leuchtreklameCOUNTER = 0;
			if (my.skill8 < 17)
			{
				Remove_A_lightTYPE5(my.skill8);Remove_B_lightTYPE5(my.skill8);Remove_C_lightTYPE5(my.skill8);Remove_D_lightTYPE5(my.skill8);Remove_E_lightTYPE5(my.skill8);
				Remove_F_lightTYPE5(my.skill8);Remove_G_lightTYPE5(my.skill8);Remove_H_lightTYPE5(my.skill8);Remove_I_lightTYPE5(my.skill8);Remove_J_lightTYPE5(my.skill8);
			}
			if (my.skill8 == 17)
			{
				Remove_A_lightTYPE6(my.skill8);Remove_B_lightTYPE6(my.skill8);Remove_C_lightTYPE6(my.skill8);Remove_D_lightTYPE6(my.skill8);Remove_E_lightTYPE6(my.skill8);
				Remove_F_lightTYPE6(my.skill8);Remove_G_lightTYPE6(my.skill8);Remove_H_lightTYPE6(my.skill8);Remove_I_lightTYPE6(my.skill8);Remove_J_lightTYPE6(my.skill8);
			}
			lens_dust_flares_REMOVE();
		}


			//HIER STARTET NUN DIE LICHTSTEUERUNG * * * * * * * * * * * * * * * * * * * * * * *
			//AND HERE STARTS THE LIGHTSHOW CONTROL
			if (my.skill8 == 14)//"pi" von pizza 
			{
				if ((leuchtreklameCOUNTER > 0 && leuchtreklameCOUNTER < 101) || leuchtreklameCOUNTER > 420)//licht ein + lens-flares-effekte. LIGHT ON + LIGHT EFFECTS
				{
					my.ambient = 100;my.material = null;	vec_set(my.blue, vector(0,my_color,0));my_color = my.skill40 * 2;	
					if (leuchtreklameCOUNTER < 420) {my.skill40 = 100;my.lightrange = 600;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 0) {my.skill40 = 100;my.lightrange = 600;my_SW = 1;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 1) {my.skill40 -= 1*time;my.lightrange-=6*time;}//lichtstärke wird hier abgefadet (+alle alpha werte: skill40)
					//fade the light + all alphavalues (master alpha skill40)
					vec_set(my.skill2, my.blue);//kopiere farbe meines skills2-4 auf lichtfarbe. WE CAN USE SKILL2-4 ALSO TO COLOUR the ENTITY (this action)
				}
				if ((leuchtreklameCOUNTER > 100 && leuchtreklameCOUNTER < 420) || leuchtreklameCOUNTER > 520)//licht & lens-flares aus. NOW SWITCH OFF ALL!
				{	my.lightrange = 0;my.material = mat_dark; my.skill40 = 0; if (leuchtreklameCOUNTER > 520 && my_SW == 1) {my_SW = 0;}	}//skill40 = masteralpha fader!
			}
			if (my.skill8 == 15)//"z" von pizza 
			{
				if ((leuchtreklameCOUNTER > 99 && leuchtreklameCOUNTER < 201) || leuchtreklameCOUNTER > 420)
				{
					my.ambient = 100;my.material = null;	vec_set(my.blue, vector(my_color,my_color,my_color));my_color = my.skill40 * 2;
					if (leuchtreklameCOUNTER < 420) {my.skill40 = 100;my.lightrange = 600;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 0) {my.skill40 = 100;my.lightrange = 600;my_SW = 1;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 1) {my.skill40 -= 1*time;my.lightrange-=6*time;}
					vec_set(my.skill2, my.blue);
				}
				if ((leuchtreklameCOUNTER > 200 && leuchtreklameCOUNTER < 420) || leuchtreklameCOUNTER > 520)
				{	my.lightrange = 0;my.material = mat_dark; my.skill40 = 0; if (leuchtreklameCOUNTER > 520 && my_SW == 1) {my_SW = 0;}	}
			}
			if (my.skill8 == 16)//"za" von pizza 
			{
				if ((leuchtreklameCOUNTER > 199 && leuchtreklameCOUNTER < 301) || leuchtreklameCOUNTER > 420)
				{
					my.ambient = 100;my.material = null;	vec_set(my.blue, vector((my_color/8),(my_color/8),my_color));my_color = my.skill40 * 2;
					if (leuchtreklameCOUNTER < 420) {my.skill40 = 100;my.lightrange = 600;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 0) {my.skill40 = 100;my.lightrange = 600;my_SW = 1;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 1) {my.skill40 -= 1*time;my.lightrange-=6*time;}
					vec_set(my.skill2, my.blue);
				}
				if ((leuchtreklameCOUNTER > 300 && leuchtreklameCOUNTER < 420) || leuchtreklameCOUNTER > 520)
				{	my.lightrange = 0;my.material = mat_dark; my.skill40 = 0; if (leuchtreklameCOUNTER > 520 && my_SW == 1) {my_SW = 0;}	}
			}
			if (my.skill8 == 17)//"i"-punkt von pizza 
			{
				if ((leuchtreklameCOUNTER > 299 && leuchtreklameCOUNTER < 401) || leuchtreklameCOUNTER > 420)
				{
					my.ambient = 100;my.material = null;	vec_set(my.blue, vector(my_color,(my_color/8),(my_color/8)));my_color = my.skill40 * 2;
					if (leuchtreklameCOUNTER < 420) {my.skill40 = 100;my.lightrange = 600;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 0) {my.skill40 = 100;my.lightrange = 600;my_SW = 1;}
					if (leuchtreklameCOUNTER > 420 && my_SW == 1) {my.skill40 -= 1*time;my.lightrange-=6*time;}
					vec_set(my.skill2, my.blue);
				}
				if ((leuchtreklameCOUNTER > 400 && leuchtreklameCOUNTER < 420) || leuchtreklameCOUNTER > 520)
				{	my.lightrange = 0;my.material = mat_dark; my.skill40 = 0; if (leuchtreklameCOUNTER > 520 && my_SW == 1) {my_SW = 0;}	}
			}

		wait(1);
	}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
material mat_red   
{ 
	ambient_blue = 50;ambient_green = 50;ambient_red = 250;diffuse_blue = 100;diffuse_green = 100;diffuse_red = 250;
	specular_blue = 0;specular_green = 0;specular_red = 0;power = 10;
}
material mat_green   
{ 
	ambient_blue = 50;ambient_green = 250;ambient_red = 50;diffuse_blue = 100;diffuse_green = 250;diffuse_red = 100;
	specular_blue = 0;specular_green = 0;specular_red = 0;power = 10;
}
material mat_blue  
{ 
	ambient_blue = 250;ambient_green = 50;ambient_red = 50;diffuse_blue = 250;diffuse_green = 100;diffuse_red = 100;
	specular_blue = 0;specular_green = 0;specular_red = 0;power = 10;
}
function lampen_lang_aura
{
	my.invisible = on;while(you.flag2 == 0) {wait(1);}//warte bis der creator sein flag2 auf 1 gesetzt hat. wait until the creator has put his flag2 to the value 1.
	my.passable = on;my.bright = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.scale_x = 1;my.scale_y = 0.2;
	if (you.skill8 == 11) {my.material = mat_red;}if (you.skill8 == 12) {my.material = mat_green;}if (you.skill8 == 13) {my.material = mat_blue;}
	while(you.flag2 == 1)	
	{
		my.invisible = off;my.pan = you.pan;my.tilt = you.tilt;my.alpha = 10+((you.skill7/100)*(you.skill21/100)*you.skill90);my.alpha=min(50, my.alpha);	
		wait(1);	
	}
	ent_remove(me);//eliminiere aura wenn kamera sich von der lichtquelle entfernt hat (sein skill1 wert). ELIMINATE MY AURA IF CAMERA HAS LEFT THE LIGHTSOURCE AREA(skill1)
}

function lampen_lang_B
{
	vec_set(my.scale_x, you.scale_x);//diese funktion hier ist nur das Gehäuse der lichtquelle. THIS HERE IS THE CASING OF THE LIGHT.
}

//lange lampen, ohne lens-dust effekte
//LONG LAMPS, without dust-flares effects
function InitializeLF_A_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer = ent_createlayer("LF_10grp9.tga",0,5);   LF_indx[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;  							vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_A_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer.alpha=((my.skill7/100)*(my.skill21/100)*my.skill90)-15;
}
function SpecialFX_A_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);	LF_pointer.scale_x = 5 * (my.skill21/100);LF_pointer.scale_y = 10 * (my.skill21/100);
}
function Remove_A_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   ent_remove(LF_pointer); 
}
		//*********-------
function InitializeLF_B_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);  LF_pointer = ent_createlayer("LF_10grp4.tga",0,2);   LF_indxB[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;  							LF_pointer.alpha = 0;   LF_pointer.scale_y = 8;LF_pointer.LF_axPIVrl=-0.5;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(180,10,50));}   if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(10,10,220));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(50,200,50));}   if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(200,50,0));}
}
function PlaceLF_B_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_PlaceX(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_B_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   LF_pointer.alpha=((150/100)*(my.skill21/100)*my.skill90);
}
function SpecialFX_B_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);	LF_pointer.scale_x = 0.5 + abs(my.skill70/5);
}
function Remove_B_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_C_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxC[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1.2;  						LF_pointer.alpha = 0;   LF_pointer.LF_axPIVrl=-2; 	LF_pointer.LF_axPIVud=0.4;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(100,220,100));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(100,250,120));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(150,190,10));}   		if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(220,120,100));}
}
function PlaceLF_C_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_C_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   LF_pointer.alpha=(25/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_C_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);	LF_pointer.scale_y = 0.2 + (abs(my.skill70/800)*(my.skill21/30));LF_pointer.scale_x=LF_pointer.scale_y+0.7;
}
function Remove_C_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_D_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxD[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1.2;  						LF_pointer.alpha = 0;   LF_pointer.LF_axPIVrl=-1; 	LF_pointer.LF_axPIVud=0.4;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(200,100,130));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(90,100,200));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(100,200,70));}   		if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(200,80,170));}
}
function PlaceLF_D_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_D_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   LF_pointer.alpha=(60/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_D_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);	LF_pointer.scale_y = 0.3 + (abs(my.skill70/200)*(my.skill21/100));LF_pointer.scale_x=LF_pointer.scale_y;
}
function Remove_D_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_E_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);  LF_pointer = ent_createlayer("LF_10grp10.tga",0,6);   LF_indxE[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1.2;  						LF_pointer.alpha = 0;
   LF_pointer.LF_axPIVrl=-1; 	LF_pointer.LF_axPIVud=-1;
}
function PlaceLF_E_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_E_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   //in diesem fall benützen wir die skill5 dieses flares (LF_temp1) um zwischenspeicherungen durchzuführen
   //store some datas on the (skill5 = define LF_temp1) of the created flare
   if (my.skill32 > 0) {LF_pointer.LF_temp1 = my.skill32/3; LF_pointer.alpha = ((LF_pointer.LF_temp1)*(LF_pointer.LF_temp1));} 
   else {LF_pointer.alpha = 0;} //skill32 kommt von der action und gibt die distanzdaten an, ab wann dieser flare hier aktiviert(sichtbar) werden muss. 
   //skill32 value comes from the action itself. a kind of switch on/off to show this flare from a certain distance
}
function SpecialFX_E_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);	LF_pointer.scale_x = my.skill50;LF_pointer.scale_x = max (3, LF_pointer.scale_x);
	LF_pointer.scale_y = LF_pointer.scale_x;				LF_pointer.roll = my.skill55-(my.skill55*2)-45;
}
function Remove_E_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_F_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxF[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;  						LF_pointer.alpha = 0;   LF_pointer.LF_axPIVrl=0.8; 	LF_pointer.LF_axPIVud=-0.1;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(200,30,170));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(250,50,190));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(0,160,190));}   	if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(200,250,30));}
}
function PlaceLF_F_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_F_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   LF_pointer.alpha=(25/100)*my.skill90*(my.skill21/100);
}
function SpecialFX_F_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);	LF_pointer.scale_y = 0.1 + (abs(my.skill70/800)*(my.skill21/25));	LF_pointer.scale_x = 0.5 + abs(my.skill70/150);
}
function Remove_F_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_g_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxg[LF_number]);  LF_pointer = ent_createlayer("lf_ent_spz.mdl",0,1);   LF_indxg[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = 1;  						LF_pointer.alpha = 0;   LF_pointer.LF_axPIVud=-0.3;
   LF_pointer.scale_y = 300;								LF_pointer.scale_z = 300;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(120,50,80));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue,vector(10,10,120));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue,vector(80,120,50));}   	if (my.skill8 == 13) {vec_set(LF_pointer.blue,vector(150,130,50));}
}
function PlaceLF_g_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxg[LF_number]);   LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_G_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxg[LF_number]);   LF_pointer.alpha = my.skill21-60;
}
function SpecialFX_g_lightTYPE4(animation)
{
	LF_pointer = ptr_for_handle(LF_indxG[animation]);
	if (mouse_force.x > 0 || mouse_force.x < 0) {LF_pointer.v += (camera.pan*camera.pan);} 	else {LF_pointer.v += 0.4*time;}
	if (mouse_force.y > 0 || mouse_force.y < 0) {LF_pointer.u += (camera.tilt*camera.tilt);} 	else {LF_pointer.u -= 0.1*time;}
}
function Remove_g_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxg[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_H_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxH[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.7;  						LF_pointer.alpha = 0;   LF_pointer.scale_x = 1.8;LF_pointer.scale_y = 0.4;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(70,20,10));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(30,10,70));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(20,80,10));}   	if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(80,10,30));}
}
function PlaceLF_H_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_H_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   LF_pointer.LF_maxALPHA = abs(my.skill70)/9;
   LF_pointer.alpha=(LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill21/100);
}
function Remove_H_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_I_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxI[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -0.3;  						LF_pointer.alpha = 0;   LF_pointer.scale_x = 1.5;LF_pointer.scale_y = 0.2;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(70,20,10));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(20,100,10));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(10,60,20));}   	if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(10,60,20));}
}
function PlaceLF_I_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_I_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   LF_pointer.LF_maxALPHA = abs(my.skill70)/9;
   LF_pointer.alpha=(LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill21/100);
}
function Remove_I_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_J_lightTYPE4(LF_number)
{
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);  LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);   LF_indxJ[my.skill8] = handle(LF_pointer);
   LF_pointer.LF_pivot_dist = -1;  						LF_pointer.alpha = 0;   LF_pointer.scale_x = 2.2;LF_pointer.scale_y = 0.5;
   if (my.skill8 == 10) {vec_set(LF_pointer.blue, vector(70,20,10));}   	if (my.skill8 == 11) {vec_set(LF_pointer.blue, vector(30,80,20));}
   if (my.skill8 == 12) {vec_set(LF_pointer.blue, vector(80,20,120));}   	if (my.skill8 == 13) {vec_set(LF_pointer.blue, vector(80,20,80));}
}
function PlaceLF_J_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_J_lightTYPE4(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   LF_pointer.LF_maxALPHA = abs(my.skill70)/9;
   LF_pointer.alpha=(LF_pointer.LF_maxALPHA/100)*my.skill90*(my.skill21/100);
}
function Remove_J_lightTYPE4(LF_number)	{  LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   ent_remove(LF_pointer); }
		//*********-------


action lampen_lang
{//4 lichtquellen mit verschiedenen farben und den gleichen lens-flares (tot. 10 flares) benützen diese action
//4 lightsources with different colours will use the same lens-flares (total 10 flares)
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;
	ent_create("lampeB.mdl", my.pos, lampen_lang_B);//das Gehäuse der lichtquelle separat laden, diese leuchtet ja nicht auf wie die lichtquelle.
	//load the case separately in a function, we want only to colour the long-lamp and not the case. (my.material = ...) 
	//ich bin die leuchtquelle, nicht das Gehäuse. leuchte auf + färben
	my.ambient = 100;my.albedo=-100;if(my.skill8 == 11){my.material = mat_red;}if(my.skill8 == 12){my.material = mat_green;}if(my.skill8 == 13){my.material = mat_blue;}
	var my_temp[2];

	while(1)
	{
		my.skill21 = 100-(((100/my.skill1)*vec_dist(my.x, camera.x)));//für den alpha wert der flares je nach distanz der lichtquelle zur kamera
		vec_set(my.skill70, my.pos);//calculate the alpha value in dependence of the distance to the camera

		if (vec_dist(my.x, camera.x) < my.skill1)
		{
			if (my.flag2 == 0)	
			{
				InitializeLF_A_lightTYPE4(my.skill8);	InitializeLF_B_lightTYPE4(my.skill8);	InitializeLF_C_lightTYPE4(my.skill8);
				InitializeLF_D_lightTYPE4(my.skill8);	InitializeLF_E_lightTYPE4(my.skill8);	InitializeLF_F_lightTYPE4(my.skill8);
				InitializeLF_G_lightTYPE4(my.skill8);	InitializeLF_H_lightTYPE4(my.skill8);	InitializeLF_I_lightTYPE4(my.skill8);
				InitializeLF_J_lightTYPE4(my.skill8);	ent_create("LF_10grp9.tga", my.pos, lampen_lang_aura);				my.flag2 = 1;
			}

			LF_tracer();my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				AlphaControl_A_lightTYPE4(my.skill8);	AlphaControl_B_lightTYPE4(my.skill8);	AlphaControl_C_lightTYPE4(my.skill8);
				AlphaControl_D_lightTYPE4(my.skill8);	AlphaControl_E_lightTYPE4(my.skill8);	AlphaControl_F_lightTYPE4(my.skill8);
				AlphaControl_G_lightTYPE4(my.skill8);	AlphaControl_H_lightTYPE4(my.skill8);	AlphaControl_I_lightTYPE4(my.skill8);AlphaControl_J_lightTYPE4(my.skill8);
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;	my.skill71 -= 0.5 * screen_size.y;
				PlaceLF_A_lightTYPE4(my.skill8);AlphaControl_A_lightTYPE4(my.skill8);SpecialFX_A_lightTYPE4(my.skill8);
				PlaceLF_B_lightTYPE4(my.skill8);AlphaControl_B_lightTYPE4(my.skill8);SpecialFX_B_lightTYPE4(my.skill8);
				PlaceLF_C_lightTYPE4(my.skill8);AlphaControl_C_lightTYPE4(my.skill8);SpecialFX_C_lightTYPE4(my.skill8);
				PlaceLF_D_lightTYPE4(my.skill8);AlphaControl_D_lightTYPE4(my.skill8);SpecialFX_D_lightTYPE4(my.skill8);
				PlaceLF_E_lightTYPE4(my.skill8);AlphaControl_E_lightTYPE4(my.skill8);SpecialFX_E_lightTYPE4(my.skill8);
				PlaceLF_F_lightTYPE4(my.skill8);AlphaControl_F_lightTYPE4(my.skill8);SpecialFX_F_lightTYPE4(my.skill8);
				PlaceLF_G_lightTYPE4(my.skill8);AlphaControl_G_lightTYPE4(my.skill8);SpecialFX_G_lightTYPE4(my.skill8);
				PlaceLF_H_lightTYPE4(my.skill8);AlphaControl_H_lightTYPE4(my.skill8);
				PlaceLF_I_lightTYPE4(my.skill8);AlphaControl_I_lightTYPE4(my.skill8);
				PlaceLF_J_lightTYPE4(my.skill8);AlphaControl_J_lightTYPE4(my.skill8);

				if (abs(my.skill70) > abs(my.skill71)) {my.skill50 = abs(my.skill70/30);}if (abs(my.skill71) > abs(my.skill70)) {my.skill50 = abs(my.skill71/30);}
				my_temp[0] = (my.skill70 - my.skill70);my_temp[1] = (my.skill71-my.skill71);		vec_set(my.skill40, my.skill70);//halbmond flare dreht um zentrum rum
				//this is a "half-moon" flare turns arround on the centre of the lightsource
				vec_sub(my.skill40, my_temp[0]); vec_to_angle(my.skill55, my.skill40);		  		my.skill32 = (-50+my.skill21);

				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}

				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}

		if (vec_dist(my.x, camera.x) > (my.skill1-1) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha = my.skill7;
			Remove_A_lightTYPE4(my.skill8);Remove_B_lightTYPE4(my.skill8);Remove_C_lightTYPE4(my.skill8);Remove_D_lightTYPE4(my.skill8);Remove_E_lightTYPE4(my.skill8);
			Remove_F_lightTYPE4(my.skill8);Remove_G_lightTYPE4(my.skill8);Remove_H_lightTYPE4(my.skill8);Remove_I_lightTYPE4(my.skill8);Remove_J_lightTYPE4(my.skill8);
			my.flag2 = 0;
		}

		wait(1);
	}
}


///////////////////////////////////////////////////////*** LICHT TYP 1 - 3 ***///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////*** LIGHT TYP 1 - 3 ***///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////*** LICHT TYP 1 - 3 ***///////////////////////////////////////////////////////////////////////////

//flare1 ist eine sternförmige flare (LF_sunA.tga). typ1 bezieht sich auf laternenlicht-flares. diese dreht sich langsam um seine eigene achse (roll-wert!)
//flare1 is a kind of starlight. TYPE1 means light of the "streetlamps"-flares. this one here turns slowly around his own axis. (roll-value)
function InitializeLF_A_lightTYPE1(LF_number)
{	//initialisierung...
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer = ent_createlayer("LF_sunA.tga",0,5);
   LF_indx[my.skill8] = handle(LF_pointer);   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 2;LF_pointer.scale_y = 2;
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));			LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_A_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   LF_pointer.alpha=(30/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_A_lightTYPE1(rollen)
{
	LF_pointer = ptr_for_handle(LF_indx[rollen]);			LF_pointer.roll += 0.03 * time;
}
function Remove_A_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   ent_remove(LF_pointer); 
}
		//*********-------
//2.flare ist auch eine sternförmige flare, dreht aber in die gegengesetzte richtung als A. TYPE1.
//flare 2 is similar to flare1 turning on the other side arround as type A.
function InitializeLF_B_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);		LF_pointer = ent_createlayer("LF_sunA.tga",0,4);
   LF_indxB[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 2.1;LF_pointer.scale_y = 2.1;
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
}
function PlaceLF_B_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_B_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   	LF_pointer.alpha=(100/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_B_lightTYPE1(wieBITTE)
{	
	LF_pointer = ptr_for_handle(LF_indxB[wieBITTE]);		LF_pointer.roll -= 0.07 * time;
}
function Remove_B_lightTYPE1(LF_number)
{	 LF_pointer = ptr_for_handle(LF_indxB[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//3. flare des laternenlichts, 2 äussere halbmonde
//3. flare = 2 external "half-moon" flares
function InitializeLF_C_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);		LF_pointer = ent_createlayer("LF_sunG.tga",0,3);
   LF_indxC[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1;LF_pointer.scale_x = 2;LF_pointer.scale_y = 2;
   vec_set(LF_pointer.blue, vector(my.skill2,my.skill3,my.skill4));   LF_pointer.alpha = 0;
   my.skill30 = LF_pointer.scale_x/4;//skill30 kommt von der action um den speziellen alpha wert dieses flares zu ermitteln....
   //calculate the alpha value of this flare with the skill30 of the action
}
function PlaceLF_C_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_C_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     LF_pointer.alpha = ((1*(my.skill21/250)*(my.skill31+my.skill31+my.skill31))*my.skill30)*(my.skill90/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_C_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);
}
function Remove_C_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxC[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//4. flare des laternenlichts, lange blaue linie die breiter wird wenn kamera ausserhalb der sicht geht
//4 flare, a long bluish flare that becomes wider if camera goes off-screen
function InitializeLF_D_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);		LF_pointer = ent_createlayer("LF_sunE.tga",0,2);
   LF_indxD[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1;	LF_pointer.LF_axPIVud = 0.1;   LF_pointer.alpha = 0;
}
function PlaceLF_D_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   	LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_D_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);     LF_pointer.alpha=(15/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_D_lightTYPE1(stretch)
{	
	LF_pointer = ptr_for_handle(LF_indxD[stretch]);			LF_pointer.scale_x = abs(my.skill70/100);LF_pointer.scale_y = abs(my.skill70/50);
}
function Remove_D_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxD[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//5. flare des laternenlichts, 7-Eckiges muster das oberhalb der lichtquelle erscheint
//5. flare, 7-Square pic that appears above the lightsource 
function InitializeLF_E_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,4);
   LF_indxE[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1.2;   LF_pointer.scale_x = 2;	LF_pointer.scale_y = 2;   LF_pointer.alpha = 0;
}
function PlaceLF_E_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_E_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);     LF_pointer.alpha=(25/100)*(my.skill21/100)*my.skill90;
}
function Remove_E_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxE[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//6. flare des laternenlichts, rundes muster
//6. flare, a round model/pic
function InitializeLF_F_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,2);
   LF_indxF[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 0.8;   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;
   if (my.skill8 == 1) {vec_set(LF_pointer.blue, vector(80,80,200));}//die erste laterne hat einen rotstich, färbe deshalb dieses flare auch rötlich
   if (my.skill8 == 2) {vec_set(LF_pointer.blue, vector(80,160,180));}//diese hier gelblich
   if (my.skill8 == 3) {vec_set(LF_pointer.blue, vector(50,170,50));}//diese hier grünlich
   if (my.skill8 == 4) {vec_set(LF_pointer.blue, vector(180,150,150));}//diese leicht bläulich
   //here the different coulors of the lightsource in respect of their id (skill8)
   LF_pointer.alpha = 0;
}
function PlaceLF_F_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_F_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);     LF_pointer.alpha=(50/100)*(my.skill21/100)*my.skill90;
}
function Remove_F_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxF[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//7. flare des laternenlichts, 7-Eckiges muster, unterhalb der lichtquelle
//7. flare, 7-Square pic below the lichtsource
function InitializeLF_G_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,2);
   LF_indxG[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 0.5;   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;
   if (my.skill8 == 1) {vec_set(LF_pointer.blue, vector(180,80,200));}//erste laterne: violett
   if (my.skill8 == 2) {vec_set(LF_pointer.blue, vector(180,100,80));}//2: blau
   if (my.skill8 == 3) {vec_set(LF_pointer.blue, vector(50,170,180));}//3: gelblich
   if (my.skill8 == 4) {vec_set(LF_pointer.blue, vector(50,170,50));}//4: grün
   LF_pointer.alpha = 0;
}
function PlaceLF_G_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_G_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);     LF_pointer.alpha=(20/100)*(my.skill21/100)*my.skill90;
}
function Remove_G_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxG[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//8. flare des laternenlichts, 7-Eckiges muster, unterhalb der lichtquelle
//8. flare, 7-Square pic below the lichtsource
function InitializeLF_H_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,3);
   LF_indxH[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = -0.05;   LF_pointer.scale_x = 1.2;	LF_pointer.scale_y = 1.2;
   if (my.skill8 == 1) {vec_set(LF_pointer.blue, vector(0,130,100));}//erste laterne: "kotz"-gelb
   if (my.skill8 == 2) {vec_set(LF_pointer.blue, vector(180,200,0));}//2: zyan
   if (my.skill8 == 3) {vec_set(LF_pointer.blue, vector(250,70,200));}//3: rosa
   if (my.skill8 == 4) {vec_set(LF_pointer.blue, vector(200,100,250));}//4: hellviolett
   LF_pointer.alpha = 0;
}
function PlaceLF_H_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_H_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);     LF_pointer.alpha=(10/100)*(my.skill21/100)*my.skill90;
}
function Remove_H_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxH[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//9. flare des laternenlichts, 7-Eckiges muster, unterhalb der lichtquelle
//9. flare, 7-Square pic below the lichtsource
function InitializeLF_I_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,3);
   LF_indxI[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = -0.9;   LF_pointer.scale_x = 2.8;	LF_pointer.scale_y = 2.8;
   if (my.skill8 == 1) {vec_set(LF_pointer.blue, vector(150,50,70));}//erste laterne: bläulich
   if (my.skill8 == 2) {vec_set(LF_pointer.blue, vector(100,180,200));}//2: leicht gelblich
   if (my.skill8 == 3) {vec_set(LF_pointer.blue, vector(130,180,120));}//3: leicht grünlich
   if (my.skill8 == 4) {vec_set(LF_pointer.blue, vector(160,100,190));}//4: leicht violett
   LF_pointer.alpha = 0;
}
function PlaceLF_I_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_I_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);     LF_pointer.alpha=(18/100)*(my.skill21/100)*my.skill90;
}
function Remove_I_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxI[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//10. flare des laternenlichts, spezielles flare (model-entity), unterhalb der lichtquelle, die zusätzlich animiert werden kann
//10. flare, this is a model-entity with skin-animation
function InitializeLF_J_lightTYPE1(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);		LF_pointer = ent_createlayer("lf_ent_spz.mdl",0,1);
   LF_indxJ[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = -1.8;   LF_pointer.scale_y = 40;	LF_pointer.scale_z = 40;   LF_pointer.alpha = 0;
}
function PlaceLF_J_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_J_lightTYPE1(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);     LF_pointer.alpha = ((1*(my.skill21/1200)*(my.skill31+my.skill31+my.skill31))*my.skill30)*(my.skill90/100);
   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_J_lightTYPE1(LF_number)
{	//falls mal die alpha bei hindernissen anders abfaden muss.... (sonst benütze einfach wieder function AlphaControl_.......)
	//ich glaub aber, es wäre besser IMMER eine zusätzliche alpha_fade out funktion zu konstruieren.... bei einigen lichtquellen waren auch ausserhalb der kamera,
	//flares sichtbar weil deren alphawert nicht komplett auf 0 gesetzt wurden... (wenn man's besser programmieren würde.... no comment)
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);
}
function SpecialFX_J_lightTYPE1(animation)
{
	LF_pointer = ptr_for_handle(LF_indxJ[animation]);//lensflare-typ = textur-animierbare entity
	if (mouse_force.x > 0 || mouse_force.x < 0) {LF_pointer.v += (camera.pan*camera.pan);} 	else {LF_pointer.v += 0.4*time;}
	if (mouse_force.y > 0 || mouse_force.y < 0) {LF_pointer.u += (camera.tilt*camera.tilt);} 	else {LF_pointer.u -= 0.1*time;}
}
function Remove_J_lightTYPE1(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);	   ent_remove(LF_pointer); }
//ENDE alle 10 lens-flares ...................


function lights_P_I_aura
{
	my.invisible = on;while(you.flag2 == 0) {wait(1);}
	my.passable = on;my.bright = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.scale_x = 1;my.scale_y = 1;
	while(you.flag2 == 1)
	{
		my.invisible = off;my.alpha = (you.skill7*(you.skill21/100))+25;	my.alpha=min(you.skill7, my.alpha);	
		wait(1);	
	}
	ent_remove(me);
}
//----*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*----
action lights_POITR_INDX_1
{//dies ist die lichtquelle vom typ 1, laternenlicht # # # # #
//THIS IS THE LIGHTSOURCE TYPE 1 of the "streetlamps"
	my.passable = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.alpha = 80;
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;

	while(1)
	{
		my.skill21 = 100-(((100/my.skill1)*vec_dist(my.x, camera.x)));
		vec_set(my.skill70, my.pos);

		if (vec_dist(my.x, camera.x) < my.skill1)
		{
			if (my.flag2 == 0)
			{
				InitializeLF_A_lightTYPE1(my.skill8);//im ganzen hat diese lichtquelle (laterne) 10 flares! (nicht 10 pointers generieren aber dafür 10 arrays die dann...)
				InitializeLF_B_lightTYPE1(my.skill8);//alle lichtquellen (mit gleichen lens-flares), im gesamten level, nutzen können!
				InitializeLF_C_lightTYPE1(my.skill8);//this "streetlamps" creates 10 flares (they don't need 10 pointer but 10 arrays to control several lightsources, but
				//that are using the same lens-flares) 
				InitializeLF_D_lightTYPE1(my.skill8);				InitializeLF_E_lightTYPE1(my.skill8);				InitializeLF_F_lightTYPE1(my.skill8);
				InitializeLF_G_lightTYPE1(my.skill8);				InitializeLF_H_lightTYPE1(my.skill8);				InitializeLF_I_lightTYPE1(my.skill8);
				InitializeLF_J_lightTYPE1(my.skill8);
				ent_create("LF_sunB.tga", my.pos, lights_P_I_aura);
				my.flag2 = 1;
			}
		
			LF_tracer();
			my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				AlphaControl_A_lightTYPE1(my.skill8);AlphaControl_B_lightTYPE1(my.skill8);AlphaFadeout_C_lightTYPE1(my.skill8);AlphaControl_D_lightTYPE1(my.skill8);
				AlphaControl_E_lightTYPE1(my.skill8);AlphaControl_F_lightTYPE1(my.skill8);AlphaControl_G_lightTYPE1(my.skill8);AlphaControl_H_lightTYPE1(my.skill8);
				AlphaControl_I_lightTYPE1(my.skill8);AlphaFadeout_J_lightTYPE1(my.skill8);
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				PlaceLF_A_lightTYPE1(my.skill8);		AlphaControl_A_lightTYPE1(my.skill8);				SpecialFX_A_lightTYPE1(my.skill8);
				PlaceLF_B_lightTYPE1(my.skill8);		AlphaControl_B_lightTYPE1(my.skill8);				SpecialFX_B_lightTYPE1(my.skill8);	//2. flare
				PlaceLF_C_lightTYPE1(my.skill8);		AlphaControl_C_lightTYPE1(my.skill8);				my.skill31 = (-60+my.skill21);		//3. flare
				PlaceLF_D_lightTYPE1(my.skill8);		AlphaControl_D_lightTYPE1(my.skill8);				SpecialFX_D_lightTYPE1(my.skill8);	//4. flare
				PlaceLF_E_lightTYPE1(my.skill8);		AlphaControl_E_lightTYPE1(my.skill8);				//5. flare
				PlaceLF_F_lightTYPE1(my.skill8);		AlphaControl_F_lightTYPE1(my.skill8);				//6. flare
				PlaceLF_G_lightTYPE1(my.skill8);		AlphaControl_G_lightTYPE1(my.skill8);				//7. flare
				PlaceLF_H_lightTYPE1(my.skill8);		AlphaControl_H_lightTYPE1(my.skill8);				//8. flare
				PlaceLF_I_lightTYPE1(my.skill8);		AlphaControl_I_lightTYPE1(my.skill8);				//9. flare
				PlaceLF_J_lightTYPE1(my.skill8);		AlphaControl_J_lightTYPE1(my.skill8);				SpecialFX_J_lightTYPE1(my.skill8);//letzte spez. flare + skinanimation

				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}

				my.skill27 = abs(my.skill70);my.skill28 = abs(my.skill71);
				if (my.skill27 > my.skill28) {my.skill26 = (100-my.skill27);}	if (my.skill28 > my.skill27) {my.skill26 = (100-my.skill28);}

				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}

		if (vec_dist(my.x, camera.x) > (my.skill1+5) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha = my.skill7;
			Remove_A_lightTYPE1(my.skill8);Remove_B_lightTYPE1(my.skill8);Remove_C_lightTYPE1(my.skill8);Remove_D_lightTYPE1(my.skill8);Remove_E_lightTYPE1(my.skill8);
			Remove_F_lightTYPE1(my.skill8);Remove_G_lightTYPE1(my.skill8);Remove_H_lightTYPE1(my.skill8);Remove_I_lightTYPE1(my.skill8);Remove_J_lightTYPE1(my.skill8);
			my.flag2 = 0;
		}

		wait(1);
	}
}
//********************************************************************************************************************************************************************
//NEUER LICHTTYP + FLARES. NEW LIGHTTYPE & FLARES

//1. flare des lange-lampen lichts. wir benützen (in diesem speziellen fall) für diesen lichtquellentyp nur 5 flares!
//1. flare of the "long-lamps". we are using only 5 flares for this lightsource
function InitializeLF_A_lightTYPE2(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);		LF_pointer = ent_createlayer("LF_10grp9.tga",0,3);
   LF_indx[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1;
   if (my.skill8 == 5) {vec_set(LF_pointer.blue, vector(100,100,250));}//erste lange-lampen licht: rot
   if (my.skill8 == 6) {vec_set(LF_pointer.blue, vector(70,250,70));}//2: grün
   if (my.skill8 == 7) {vec_set(LF_pointer.blue, vector(250,100,100));}//3: blau
   if (my.skill8 == 8) {vec_set(LF_pointer.blue, vector(210,220,200));}//4: weisslich
   LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_A_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);     LF_pointer.alpha=(18/100)*(my.skill21/100)*my.skill90;
}
function SpecialFX_A_lightTYPE2(stretch)
{
	LF_pointer = ptr_for_handle(LF_indx[stretch]);		LF_pointer.scale_x = 5 * (my.skill21/100);LF_pointer.scale_y = 4 * (my.skill21/100);
}
function Remove_A_lightTYPE2(LF_number) {	 LF_pointer = ptr_for_handle(LF_indx[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//2. flare des lange-lampen lichts
function InitializeLF_B_lightTYPE2(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);		LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);
   LF_indxB[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1.2;LF_pointer.LF_axPIVrl=-1;LF_pointer.LF_axPIVud=0.4;
   if (my.skill8 == 5) {vec_set(LF_pointer.blue, vector(250,100,180));}//erste lange-lampen licht: violett
   if (my.skill8 == 6) {vec_set(LF_pointer.blue, vector(70,250,180));}//2: gelblich
   if (my.skill8 == 7) {vec_set(LF_pointer.blue, vector(200,250,100));}//3: cyan
   if (my.skill8 == 8) {vec_set(LF_pointer.blue, vector(250,120,100));}//4: bläulich
   LF_pointer.alpha = 0;
}
function PlaceLF_B_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   	LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_B_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);     if (my.skill31 > 0){LF_pointer.alpha=(1*(my.skill21/280)*(my.skill31+my.skill31+my.skill31))*(my.skill90/100);}
   else {LF_pointer.alpha = 0;}	LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_B_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);
}
function SpecialFX_B_lightTYPE2(stretch)
{
	LF_pointer = ptr_for_handle(LF_indxB[stretch]);			LF_pointer.scale_x = 2 * (my.skill21/100);LF_pointer.scale_y = abs(0.8 * (my.skill21/my.skill31));
}
function Remove_B_lightTYPE2(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxB[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//3. flare des lange-lampen lichts
function InitializeLF_C_lightTYPE2(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);		LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);
   LF_indxC[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = -0.3;LF_pointer.scale_x = 1.8;LF_pointer.scale_y = 0.4;
   if (my.skill8 == 5) {vec_set(LF_pointer.blue, vector(70,70,180));}//erste lange-lampen licht
   if (my.skill8 == 6) {vec_set(LF_pointer.blue, vector(10,100,250));}//2:
   if (my.skill8 == 7) {vec_set(LF_pointer.blue, vector(180,120,80));}//3: 
   if (my.skill8 == 8) {vec_set(LF_pointer.blue, vector(100,120,140));}//4:
   LF_pointer.alpha = 0;
}
function PlaceLF_C_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_C_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     if (my.skill31 > 0){LF_pointer.alpha=(1*(my.skill21/280)*(my.skill31))*(my.skill90/100);}
   else {LF_pointer.alpha = 0;}	LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_C_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);
}
function Remove_C_lightTYPE2(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxC[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//4. flare des lange-lampen lichts
function InitializeLF_D_lightTYPE2(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);		LF_pointer = ent_createlayer("LF_10grp9.tga",0,1);
   LF_indxD[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = -0.7;LF_pointer.scale_x = 2;LF_pointer.scale_y = 0.6;
   if (my.skill8 == 5) {vec_set(LF_pointer.blue, vector(150,150,250));}//erste lange-lampen licht
   if (my.skill8 == 6) {vec_set(LF_pointer.blue, vector(100,200,250));}//2:
   if (my.skill8 == 7) {vec_set(LF_pointer.blue, vector(250,250,150));}//3: 
   if (my.skill8 == 8) {vec_set(LF_pointer.blue, vector(200,180,240));}//4:
   LF_pointer.alpha = 0;
}
function PlaceLF_D_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_D_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);     if (my.skill31 > 0){LF_pointer.alpha=(1*(my.skill21/280)*(my.skill31))*(my.skill90/100);}
   else {LF_pointer.alpha = 0;}	LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_D_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);     LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);
}
function Remove_D_lightTYPE2(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxD[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
//5. flare des lange-lampen lichts
function InitializeLF_E_lightTYPE2(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);		LF_pointer = ent_createlayer("LF_10grp10.tga",0,1);
   LF_indxE[my.skill8] = handle(LF_pointer);			   LF_pointer.LF_pivot_dist = 1.2;LF_pointer.LF_axPIVrl = -1;LF_pointer.LF_axPIVud = -1;LF_pointer.alpha = 0;
}
function PlaceLF_E_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   	LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_E_lightTYPE2(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);
   if (my.skill32 > 0) {LF_pointer.LF_temp1 = my.skill32/5; LF_pointer.alpha = ((LF_pointer.LF_temp1+LF_pointer.LF_temp1)*(LF_pointer.LF_temp1+LF_pointer.LF_temp1));} 
   else {LF_pointer.alpha = 0;}
}
function SpecialFX_E_lightTYPE2(stretchANDroll)
{
	LF_pointer = ptr_for_handle(LF_indxE[stretchANDroll]);			LF_pointer.scale_x = my.skill50;LF_pointer.scale_x = max (3, LF_pointer.scale_x);
	LF_pointer.scale_y = LF_pointer.scale_x;								LF_pointer.roll = my.skill55-(my.skill55*2)-45;
}
function Remove_E_lightTYPE2(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxE[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------



function lights_P_I2_AURA
{
	my.invisible = on;while(you.flag2 == 0) {wait(1);}
	my.passable = on;my.bright = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.scale_x = 1;my.scale_y = 0.2;
	if (you.skill8 == 5) {my.material = mat_red;}if (you.skill8 == 6) {my.material = mat_green;}if (you.skill8 == 7) {my.material = mat_blue;}
	while(you.flag2 == 1)	
	{
		my.invisible = off;my.pan = you.pan;my.tilt = you.tilt;my.alpha = 10+((you.skill7/100)*(you.skill21/100)*you.skill90);my.alpha=min(50, my.alpha);	
		wait(1);	
	}
	ent_remove(me);
}
action lights_POITR_INDX_2
{	//das ist licht typ 2 "LANGE LAMPEN", mit total anderen lensflares!
	//This is light type 2 "long-lamps", with totaly different lens-flares (without dust-flares!)
	ent_create("lampeB.mdl", my.pos, lampen_lang_B);//das Gehäuse der lichtquelle.  THE CASE OTF THE LIGHTSOURCE
	my.ambient = 100;my.albedo=-100;if(my.skill8 == 5){my.material = mat_red;}if(my.skill8 == 6){my.material = mat_green;}if(my.skill8 == 7){my.material = mat_blue;}
	if(my.skill8 == 8){my.material = null;}	var my_temp[3];
	my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;
	
	while(1)
	{
		my.skill21 = 100-(((100/my.skill1)*vec_dist(my.x, camera.x))/0.5);//für den alpha wert der flares je nach distanz der lichtquelle zur kamera
		//ist hier etwas anders. wir sehen zwar von weitem die aura, aber erst wenn man sehr nah an der lichtquelle gekommen ist, sind auch die lensflares sichtbar!
		//i made the calculation for the alpha-value a little bit different than the other lightsourses. you can see from far away the aura but only if you come closer
		//to the lightsource you can see the lens-flares
		vec_set(my.skill70, my.pos);

		if (vec_dist(my.x, camera.x) < my.skill1)
		{
			if (my.flag2 == 0)
			{
				InitializeLF_A_lightTYPE2(my.skill8);				InitializeLF_B_lightTYPE2(my.skill8);				InitializeLF_C_lightTYPE2(my.skill8);
				InitializeLF_D_lightTYPE2(my.skill8);				InitializeLF_E_lightTYPE2(my.skill8);
				ent_create("LF_10grp9.tga", my.pos, lights_P_I2_AURA);
				my.flag2 = 1;
			}
			LF_tracer();
			my.skill90 = max(0, my.skill90);
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				AlphaControl_A_lightTYPE2(my.skill8);AlphaFadeout_B_lightTYPE2(my.skill8);AlphaFadeout_C_lightTYPE2(my.skill8);AlphaFadeout_D_lightTYPE2(my.skill8);
				AlphaControl_E_lightTYPE2(my.skill8);
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				PlaceLF_A_lightTYPE2(my.skill8);		AlphaControl_A_lightTYPE2(my.skill8);				SpecialFX_A_lightTYPE2(my.skill8);
				PlaceLF_B_lightTYPE2(my.skill8);		AlphaControl_B_lightTYPE2(my.skill8);my.skill31 = (-30+my.skill21);SpecialFX_B_lightTYPE2(my.skill8);	//2. flare,
				//die zahl -30 kann man so einstellen, dass gewisse flares erst ab einer gewissen distaz sichtbar werden. je grösser der wert, desto näher muss man sein um 
				//diese sehen zu können. wenn man will, kann man aber auch die skill der flares nutzen um so die skills der leuchtquelle zu sparen. (bsp: LF_temp1 = skill5)
				//SKILL30 is used (and experiment with this value) to switch ON certain flares only if you come close enough to the lighsource. a big value means, that you
				//have to go wery close to the lightsource to see this particular flare. if you have a lot of lightsources that switch ON in a certain distance, you
				//will maybe use the skills of the created flares (LF_temp1 = skill5) if you don't want to use too many skills from the action.
				PlaceLF_C_lightTYPE2(my.skill8);		AlphaControl_C_lightTYPE2(my.skill8);				//3. flare
				PlaceLF_D_lightTYPE2(my.skill8);		AlphaControl_D_lightTYPE2(my.skill8);				//4. flare
				PlaceLF_E_lightTYPE2(my.skill8);		AlphaControl_E_lightTYPE2(my.skill8);				SpecialFX_E_lightTYPE2(my.skill8);//5. flare
				if (abs(my.skill70) > abs(my.skill71)) {my.skill50 = abs(my.skill70/30);}if (abs(my.skill71) > abs(my.skill70)) {my.skill50 = abs(my.skill71/30);}
				my_temp[0] = (my.skill70 - my.skill70);my_temp[1] = (my.skill71-my.skill71);		vec_set(my.skill40, my.skill70);//halbmond flare dreht um zentrum rum
				vec_sub(my.skill40, my_temp[0]); vec_to_angle(my.skill55, my.skill40);		  		my.skill32 = (-80+my.skill21);

				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}

				my.skill27 = abs(my.skill70);my.skill28 = abs(my.skill71);
				if (my.skill27 > my.skill28) {my.skill26 = (100-my.skill27);}	if (my.skill28 > my.skill27) {my.skill26 = (100-my.skill28);}

				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}
		if (vec_dist(my.x, camera.x) > (my.skill1+5) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha = my.skill7;
			Remove_A_lightTYPE2(my.skill8);Remove_B_lightTYPE2(my.skill8);Remove_C_lightTYPE2(my.skill8);Remove_D_lightTYPE2(my.skill8);Remove_E_lightTYPE2(my.skill8);
			my.flag2 = 0;
		}
	
		wait(1);
	}
}
//////////------------------------------------------------------------------------------------------------------------------------------------------------------------
//UND ZULETZT NOCH EINE VERSION MIT LENS-DUST FX * * * * (sonne2)
//AND NOW A VERSION (SUN2) WITH LENS-DUST-FLARES

//1. flare der sonnen-lampen-licht. a kind of "sun-lamp" LIGHT
function InitializeLF_A_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indx[LF_number]);		LF_pointer = ent_createlayer("LF_sunA.tga",0,2);
   LF_indx[my.skill8] = handle(LF_pointer);			   	LF_pointer.LF_pivot_dist = 1;		LF_pointer.scale_x = 4;	LF_pointer.scale_y = 4;   LF_pointer.alpha = 0;
}
function PlaceLF_A_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_A_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indx[LF_number]);     	if (my.skill21 > 0) {LF_pointer.alpha=((80/100*my.skill90)+random(0.05)*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}//vorsicht skill21 zeigt auf distanz minus werte an, dann werden die flares auch von weitem sichtbar...
   //warning skill21 shows negative values if you are too far away from the lightsource. (negative values brings the flare to shine too!!)
}
function SpecialFX_A_lightTYPE3(rollen)
{
	LF_pointer = ptr_for_handle(LF_indx[rollen]);			LF_pointer.roll += 0.03 * time;
}
function Remove_A_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indx[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_B_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxB[LF_number]);		LF_pointer = ent_createlayer("LF_sunA.tga",0,1);
   LF_indxB[my.skill8] = handle(LF_pointer);			   	LF_pointer.LF_pivot_dist = 1;		LF_pointer.scale_x = 4.2;	LF_pointer.scale_y = 4.2;   LF_pointer.alpha = 0;
}
function PlaceLF_B_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_B_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxB[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=((80/100*my.skill90)+random(0.05)*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function SpecialFX_B_lightTYPE3(rollen)
{
	LF_pointer = ptr_for_handle(LF_indxB[rollen]);			LF_pointer.roll -= 0.06 * time;
}
function Remove_B_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxB[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_C_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxC[LF_number]);		LF_pointer = ent_createlayer("LF_sunB.tga",0,3);
   LF_indxC[my.skill8] = handle(LF_pointer);			   	LF_pointer.LF_pivot_dist = 1;		LF_pointer.scale_x = 10;	LF_pointer.scale_y = 10;   LF_pointer.alpha = 0;
}
function PlaceLF_C_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_C_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((my.skiLL66/100)+random(0.05))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}   LF_pointer.LF_temp1 = LF_pointer.alpha;
}
function AlphaFadeout_C_lightTYPE3(LF_number)
{
   LF_pointer = ptr_for_handle(LF_indxC[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=((LF_pointer.LF_temp1/100)*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_C_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxC[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_D_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxD[LF_number]);		LF_pointer = ent_createlayer("LF_sunH.tga",0,5);
   LF_indxD[my.skill8] = handle(LF_pointer);LF_pointer.alpha = 0;	   	LF_pointer.LF_pivot_dist = 1.08;		LF_pointer.LF_axPIVrl = -1.1; LF_pointer.LF_axPIVud = -1.1;
}
function PlaceLF_D_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);   	LF_PlaceXY(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function SpecialFX_D_lightTYPE3(spezialFX)
{
	LF_pointer = ptr_for_handle(LF_indxD[spezialFX]);
	LF_pointer.scale_x = my.skill95/250;LF_pointer.scale_y = my.skill95/250;		LF_pointer.roll = my.skill55-(my.skill55*2)-90;
}
function AlphaControl_D_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxD[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((45/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_D_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxD[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_E_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxE[LF_number]);		LF_pointer = ent_createlayer("LF_sunD.tga",0,2);
   LF_indxE[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.96;		
}
function PlaceLF_E_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_E_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxE[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((20/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function SpecialFX_E_lightTYPE3(stretch)
{
	LF_pointer = ptr_for_handle(LF_indxE[stretch]);	LF_pointer.scale_x = abs(my.skill70/70);LF_pointer.scale_y = abs(my.skill70/100);
}
function Remove_E_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxE[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_F_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxF[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxF[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.76; 
   LF_pointer.scale_x = 0.8;	LF_pointer.scale_y = 0.8;	vec_set(LF_pointer.blue, vector(100,220,240));
}
function PlaceLF_F_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_F_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxF[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((30/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_F_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxF[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_G_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxG[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxG[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.55; 
   LF_pointer.scale_x = 1.2;	LF_pointer.scale_y = 1.2;	vec_set(LF_pointer.blue, vector(100,180,230));
}
function PlaceLF_G_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_G_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxG[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((25/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_G_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxG[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_H_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxH[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxH[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.58; 
   LF_pointer.scale_x = 0.7;	LF_pointer.scale_y = 0.7;	vec_set(LF_pointer.blue, vector(10,120,180));
}
function PlaceLF_H_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_H_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxH[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((30/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_H_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxH[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_I_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxI[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxI[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.53; 
   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;	vec_set(LF_pointer.blue, vector(200,100,100));
}
function PlaceLF_I_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_I_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxI[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((40/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_I_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxI[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_J_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxJ[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.6; 
   LF_pointer.scale_x = 1.6;	LF_pointer.scale_y = 1.6;	vec_set(LF_pointer.blue, vector(200,150,250));
}
function PlaceLF_J_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_J_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((30/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_J_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxJ[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_K_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxK[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxK[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.38; 
   LF_pointer.scale_x = 1.2;	LF_pointer.scale_y = 1.2;	vec_set(LF_pointer.blue, vector(250,50,200));
}
function PlaceLF_K_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxK[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_K_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxK[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((28/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_K_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxK[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_L_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxL[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxL[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.3; 
   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;	vec_set(LF_pointer.blue, vector(190,0,90));
}
function PlaceLF_L_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxL[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_L_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxL[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((15/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_L_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxL[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_M_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxM[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxM[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.29; 
   LF_pointer.scale_x = 3;	LF_pointer.scale_y = 3;	vec_set(LF_pointer.blue, vector(200,150,10));
}
function PlaceLF_M_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxM[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_M_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxM[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((8/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_M_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxM[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_N_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxN[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxN[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.2; 
   LF_pointer.scale_x = 0.3;	LF_pointer.scale_y = 0.3;	vec_set(LF_pointer.blue, vector(100,30,0));
}
function PlaceLF_N_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxN[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_N_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxN[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((50/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_N_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxN[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_O_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxO[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxO[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.1; 
   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;	vec_set(LF_pointer.blue, vector(200,100,50));
}
function PlaceLF_O_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxO[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_O_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxO[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((25/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_O_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxO[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_P_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxP[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxP[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = 0.01; 
   LF_pointer.scale_x = 5;	LF_pointer.scale_y = 0.4;		vec_set(LF_pointer.blue, vector(200,80,150));
}
function PlaceLF_P_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxP[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_P_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxP[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((10/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function SpecialFX_P_lightTYPE3(rollin)
{
	LF_pointer = ptr_for_handle(LF_indxP[rollin]);			LF_pointer.roll = my.skill55-(my.skill55*2)-90;		LF_pointer.scale_x = abs(my.skill70/180);
}
function Remove_P_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxP[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_Q_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxQ[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxQ[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.05; 
   LF_pointer.scale_x = 1.6;	LF_pointer.scale_y = 1.6;	vec_set(LF_pointer.blue, vector(190,220,30));
}
function PlaceLF_Q_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxQ[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_Q_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxQ[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((12/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_Q_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxQ[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_R_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxR[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxR[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.1; 
   LF_pointer.scale_x = 0.6;	LF_pointer.scale_y = 0.6;	vec_set(LF_pointer.blue, vector(100,100,230));
}
function PlaceLF_R_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxR[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_R_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxR[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((25/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_R_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxR[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_S_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxS[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxS[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.35; 
   LF_pointer.scale_x = 0.9;	LF_pointer.scale_y = 0.9;	vec_set(LF_pointer.blue, vector(0,0,180));
}
function PlaceLF_S_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxS[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_S_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxS[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((40/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_S_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxS[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_T_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxT[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxT[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.3; 
   LF_pointer.scale_x = 1.7;	LF_pointer.scale_y = 1.7;	vec_set(LF_pointer.blue, vector(200,100,180));
}
function PlaceLF_T_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxT[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_T_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxT[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((60/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_T_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxT[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_U_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxU[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxU[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.48; 
   LF_pointer.scale_x = 2;	LF_pointer.scale_y = 2;			vec_set(LF_pointer.blue, vector(200,20,150));
}
function PlaceLF_U_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxU[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_U_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxU[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((15/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_U_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxU[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_V_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxV[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxV[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -0.65; 
   LF_pointer.scale_x = 0.8;	LF_pointer.scale_y = 0.8;	vec_set(LF_pointer.blue, vector(150,50,0));
}
function PlaceLF_V_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxV[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_V_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxV[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((30/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_V_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxV[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_W_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxW[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxW[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -1; 
   LF_pointer.scale_x = 2.7;	LF_pointer.scale_y = 2.7;	vec_set(LF_pointer.blue, vector(250,150,110));
}
function PlaceLF_W_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxW[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_W_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxW[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((20/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_W_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxW[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_X_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxX[LF_number]);		LF_pointer = ent_createlayer("LF_sunI.tga",0,1);
   LF_indxX[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -2; 
   LF_pointer.scale_x = 1.7;	LF_pointer.scale_y = 1.7;	vec_set(LF_pointer.blue, vector(200,250,100));
}
function PlaceLF_X_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxX[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_X_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxX[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((10/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_X_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxX[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_Y_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxY[LF_number]);		LF_pointer = ent_createlayer("LF_dirtB.tga",0,1);
   LF_indxY[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -2; 
   LF_pointer.scale_x = 13;	LF_pointer.scale_y = 13;	vec_set(LF_pointer.blue, vector(150,50,0));
}
function PlaceLF_Y_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxY[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_Y_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxY[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((15/100)+random(0.05))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function Remove_Y_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxY[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------
function InitializeLF_Z_lightTYPE3(LF_number)
{	
	LF_pointer = ptr_for_handle(LF_indxZ[LF_number]);		LF_pointer = ent_createlayer("lf_ent_spz.mdl",0,1);//animierbares model...
	//ich hatte bizarre effekte als ich den layer auf 11 erhöhte....(ent_createlayer("lf_ent_spz.mdl",0,11); )
	//mmmhh, i had some strange effects as i increased the layer-value higher than 10
   LF_indxZ[my.skill8] = handle(LF_pointer);			   	LF_pointer.alpha = 0;	LF_pointer.LF_pivot_dist = -1.5; 
   LF_pointer.scale_y = 45;	LF_pointer.scale_z = 45;	vec_set(LF_pointer.blue, vector(150,0,0));
}
function PlaceLF_Z_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxZ[LF_number]);   	LF_Place(LF_pointer, vector(my.skill70,my.skill71,my.skill72));
}
function AlphaControl_Z_lightTYPE3(LF_number)
{	
   LF_pointer = ptr_for_handle(LF_indxZ[LF_number]);     if (my.skill21 > 0) {LF_pointer.alpha=(((50/100)+random(0.08))*my.skill90)*(my.skill21/100);}
   else {LF_pointer.alpha = 0;}
}
function SpecialFX_Z_lightTYPE3(anima)
{
	LF_pointer = ptr_for_handle(LF_indxZ[anima]);
	if (mouse_force.x > 0 || mouse_force.x < 0) {LF_pointer.v += (camera.pan*camera.pan);} 	else {LF_pointer.v += 0.4*time;}
	if (mouse_force.y > 0 || mouse_force.y < 0) {LF_pointer.u += (camera.tilt*camera.tilt);} 	else {LF_pointer.u -= 0.1*time;}
}
function Remove_Z_lightTYPE3(LF_number) {	 LF_pointer = ptr_for_handle(LF_indxZ[LF_number]);	   ent_remove(LF_pointer); }
		//*********-------


function lights_P_I3_AURA
{
	my.invisible = on;while(you.flag2 == 0) {wait(1);}
	my.passable = on;my.bright = on;my.ambient = 100;my.albedo=-100;my.transparent = on;my.scale_x = 1;my.scale_y = 1;
	while(you.flag2 == 1)	{		my.invisible = off;my.pan = you.pan+0.1;my.alpha = 30;		wait(1);		}
	ent_remove(me);
}
action lights_POITR_INDX_3
{//diese ist eine art sonnen licht mit lens-dust-fx aktiv (flag8 im WED aktivieren!)
//this is a kind of "sun-lamp"-light with lens-dust-flares (activate flag8 on the model in WED)
	my.ambient = 100;my.albedo=-100;my.skill90 = my.skill7;my.flag1 = 1;my.skill91 = my.skill7;my.skill92 = my.skill7;
	var my_temp[3];var my_temp2[3];var my_radius;my_radius = my.skill5;
	
	while(1)
	{	
		my.skill21 = 100-(((100/my.skill1)*vec_dist(my.x, camera.x))/0.5);
		//die dust-flares benötigen auch diesen skill21, deshalb benützen wir hier einen anderen skill um den richtigen alphawert für die dust-flares zu erzielen.
		my.skill24 = 90-((100/my.skill1)*(vec_dist(my.x, camera.x)));
		my.skill23 = ((100/my.skill7)+random(0.3))*my.skill90;//1.) max alpha wert * hindernisse oder ausser kamerasicht berechnen. der random wert sorgt fürs flimmern
		my.skill22 = ((my.skill7/100)*my.skill24)*(my.skill23/100)*(my.skill24/100)*(my.skill26/100);//2.)alphawert des dustflares in abhängigkeit von ausserkamerasicht + 
		//distanz berechnen + abzug wenn man zu nahe an der lichtquelle kommt....dann sollten die dust-flares langsam abfaden. in diesem fall ab 300 quants...
		if (vec_dist(my.x, camera.x) < 301) {my.skill26 = (100/250)*(vec_dist(my.x, camera.x)-100);my.skill27 = 100/my.skill26;} else {my.skill26 = 100;my.skill27 = 1;}
		my.skill5=(my_radius/100)*(my.skill24*my.skill27);
		//the dust-flares are using the skill21 too, but their value must be a little be different, so we use another skill to calculate their alpha-value all because i 
		//want to see the dust-flares only on a particular distance. (but of course you can change that). skill24 = show dust-flares in dependence of: obstacles, off-
		//screen camera, distance, and in addition with my.skill24 (my distance 90-((...)

		vec_set(my.skill70, my.pos);

		if (vec_dist(my.x, camera.x) < my.skill1)
		{
			if (my.flag2 == 0)
			{
				InitializeLF_A_lightTYPE3(my.skill8);				InitializeLF_B_lightTYPE3(my.skill8);				InitializeLF_C_lightTYPE3(my.skill8);
				InitializeLF_D_lightTYPE3(my.skill8);				InitializeLF_E_lightTYPE3(my.skill8);				InitializeLF_F_lightTYPE3(my.skill8);
				InitializeLF_G_lightTYPE3(my.skill8);				InitializeLF_H_lightTYPE3(my.skill8);				InitializeLF_I_lightTYPE3(my.skill8);
				InitializeLF_J_lightTYPE3(my.skill8);				InitializeLF_K_lightTYPE3(my.skill8);				InitializeLF_L_lightTYPE3(my.skill8);
				InitializeLF_M_lightTYPE3(my.skill8);				InitializeLF_N_lightTYPE3(my.skill8);				InitializeLF_O_lightTYPE3(my.skill8);
				InitializeLF_P_lightTYPE3(my.skill8);				InitializeLF_Q_lightTYPE3(my.skill8);				InitializeLF_R_lightTYPE3(my.skill8);
				InitializeLF_S_lightTYPE3(my.skill8);				InitializeLF_T_lightTYPE3(my.skill8);				InitializeLF_U_lightTYPE3(my.skill8);
				InitializeLF_V_lightTYPE3(my.skill8);				InitializeLF_W_lightTYPE3(my.skill8);				InitializeLF_X_lightTYPE3(my.skill8);
				InitializeLF_Y_lightTYPE3(my.skill8);				InitializeLF_Z_lightTYPE3(my.skill8);				
				
				ent_create("LF_sunB.tga", my.pos, lights_P_I3_AURA);
				lens_dust_flares_INIT();
				my.flag2 = 1;
			}
			my.skill90 = max(0, my.skill90);
			LF_tracer();
			if(vec_to_screen(my.skill70, camera) == 0 || my.skill100 == 1)
			{
				if (my.skill90 > 0) {my.skill90 -= 40 * time;my.flag1 = 1;}		my.skill91 = my.skill7;my.skill92 = my.skill7;
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				AlphaControl_A_lightTYPE3(my.skill8);AlphaControl_B_lightTYPE3(my.skill8);AlphaFadeout_C_lightTYPE3(my.skill8);AlphaControl_D_lightTYPE3(my.skill8);
				AlphaControl_E_lightTYPE3(my.skill8);AlphaControl_F_lightTYPE3(my.skill8);AlphaControl_G_lightTYPE3(my.skill8);AlphaControl_H_lightTYPE3(my.skill8);
				AlphaControl_I_lightTYPE3(my.skill8);AlphaControl_J_lightTYPE3(my.skill8);AlphaControl_K_lightTYPE3(my.skill8);AlphaControl_L_lightTYPE3(my.skill8);
				AlphaControl_M_lightTYPE3(my.skill8);AlphaControl_N_lightTYPE3(my.skill8);AlphaControl_O_lightTYPE3(my.skill8);AlphaControl_P_lightTYPE3(my.skill8);
				AlphaControl_Q_lightTYPE3(my.skill8);AlphaControl_R_lightTYPE3(my.skill8);AlphaControl_S_lightTYPE3(my.skill8);AlphaControl_T_lightTYPE3(my.skill8);
				AlphaControl_U_lightTYPE3(my.skill8);AlphaControl_V_lightTYPE3(my.skill8);AlphaControl_W_lightTYPE3(my.skill8);AlphaControl_X_lightTYPE3(my.skill8);
				AlphaControl_Y_lightTYPE3(my.skill8);AlphaControl_Z_lightTYPE3(my.skill8);
				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }
			}
			else
			{
				my.skill70 -= 0.5 * screen_size.x;my.skill71 -= 0.5 * screen_size.y;
				PlaceLF_A_lightTYPE3(my.skill8);		AlphaControl_A_lightTYPE3(my.skill8);				SpecialFX_A_lightTYPE3(my.skill8);
				PlaceLF_B_lightTYPE3(my.skill8);		AlphaControl_B_lightTYPE3(my.skill8);				SpecialFX_B_lightTYPE3(my.skill8);//2. flare
				PlaceLF_C_lightTYPE3(my.skill8);		AlphaControl_C_lightTYPE3(my.skill8);				//3. flare
				PlaceLF_D_lightTYPE3(my.skill8);		AlphaControl_D_lightTYPE3(my.skill8);				SpecialFX_D_lightTYPE3(my.skill8);//4. flare regenbogen flare
				my_temp[0] = abs(my.skill70) - (abs(my.skill70)-abs(my.skill70));my_temp[1] = abs(my.skill71) - (abs(my.skill71)-abs(my.skill71));
				my.skill95 = sqrt(my_temp[0]*my_temp[0] + my_temp[1]*my_temp[1]);
				my_temp2[0] = (my.skill70 - my.skill70);my_temp2[1] = (my.skill71-my.skill71);		vec_set(my.skill50, my.skill70);
				vec_sub(my.skill50, my_temp2[0]); vec_to_angle(my.skill55, my.skill50);					
				PlaceLF_E_lightTYPE3(my.skill8);		AlphaControl_E_lightTYPE3(my.skill8);				SpecialFX_E_lightTYPE3(my.skill8);//5. flare
				PlaceLF_F_lightTYPE3(my.skill8);		AlphaControl_F_lightTYPE3(my.skill8);				//6. flare
				PlaceLF_G_lightTYPE3(my.skill8);		AlphaControl_G_lightTYPE3(my.skill8);				//7. flare
				PlaceLF_H_lightTYPE3(my.skill8);		AlphaControl_H_lightTYPE3(my.skill8);				//8. flare
				PlaceLF_I_lightTYPE3(my.skill8);		AlphaControl_I_lightTYPE3(my.skill8);				//9. flare
				PlaceLF_J_lightTYPE3(my.skill8);		AlphaControl_J_lightTYPE3(my.skill8);				//10. flare
				PlaceLF_K_lightTYPE3(my.skill8);		AlphaControl_K_lightTYPE3(my.skill8);				//11. flare
				PlaceLF_L_lightTYPE3(my.skill8);		AlphaControl_L_lightTYPE3(my.skill8);				//12. flare
				PlaceLF_M_lightTYPE3(my.skill8);		AlphaControl_M_lightTYPE3(my.skill8);				//13. flare
				PlaceLF_N_lightTYPE3(my.skill8);		AlphaControl_N_lightTYPE3(my.skill8);				//14. flare
				PlaceLF_O_lightTYPE3(my.skill8);		AlphaControl_O_lightTYPE3(my.skill8);				//15. flare
				PlaceLF_P_lightTYPE3(my.skill8);		AlphaControl_P_lightTYPE3(my.skill8);				SpecialFX_P_lightTYPE3(my.skill8);//16. flare
				PlaceLF_Q_lightTYPE3(my.skill8);		AlphaControl_Q_lightTYPE3(my.skill8);				//17. flare
				PlaceLF_R_lightTYPE3(my.skill8);		AlphaControl_R_lightTYPE3(my.skill8);				//18. flare
				PlaceLF_S_lightTYPE3(my.skill8);		AlphaControl_S_lightTYPE3(my.skill8);				//19. flare
				PlaceLF_T_lightTYPE3(my.skill8);		AlphaControl_T_lightTYPE3(my.skill8);				//20. flare
				PlaceLF_U_lightTYPE3(my.skill8);		AlphaControl_U_lightTYPE3(my.skill8);				//21. flare
				PlaceLF_V_lightTYPE3(my.skill8);		AlphaControl_V_lightTYPE3(my.skill8);				//22. flare
				PlaceLF_W_lightTYPE3(my.skill8);		AlphaControl_W_lightTYPE3(my.skill8);				//23. flare
				PlaceLF_X_lightTYPE3(my.skill8);		AlphaControl_X_lightTYPE3(my.skill8);				//24. flare
				PlaceLF_Y_lightTYPE3(my.skill8);		AlphaControl_Y_lightTYPE3(my.skill8);				//25. flare
				PlaceLF_Z_lightTYPE3(my.skill8);		AlphaControl_Z_lightTYPE3(my.skill8);				SpecialFX_Z_lightTYPE3(my.skill8);//26. flare, animierbar

				if (my.flag8 == 1) {	lens_dust_flares_ALPHA(); }

				IF (my.skill70 > 696) {my.skill91 = (796-my.skill70);} IF (my.skill70 < -696) {my.skill91 = abs((-796-my.skill70));}
				IF (my.skill71 > 495) {my.skill92 = (595-my.skill71);} IF (my.skill71 < -495) {my.skill92 = abs((-595-my.skill71));}				
				if (my.skill70 > 696 || my.skill70 < -696 || my.skill71 > 495 || my.skill71 < -495)
				{if (my.skill91 < my.skill92) {my.skill90 = my.skill91;}	if (my.skill92 < my.skill91) {my.skill90 = my.skill92;}}
				
				my.skiLL67 = abs(my.skill70);my.skiLL68 = abs(my.skill71);//dieser effekt ist erst ab einer gewissen distanz sichtbar. (skiLL65) 
				//skill65 some flares show their effect only in a certain distance
				if (my.skiLL67 > my.skiLL68) {my.skiLL66 = (100-my.skiLL67)*(my.skiLL65/100);}if (my.skiLL68 > my.skiLL67) {my.skiLL66 = (100-my.skiLL68)*(my.skiLL65/100);}
				if (vec_dist(my.x, camera.x) < 601) {my.skiLL65 = 600-vec_dist(my.x, camera.x);my.skiLL65=min(100,my.skiLL65);} else {my.skiLL65 = 1;}

				if (my.skill90 < my.skill7 && my.flag1 == 1) {my.skill90 += 40 * time; if (my.skill90 > (my.skill7-1)) {my.skill90 = my.skill7;my.flag1 = 0;}}	
			}
		}

			if (my.flag8 == 1) {	my.skill60 = my.skill70+800;my.skill61 = my.skill71+600;	}

		if (vec_dist(my.x, camera.x) > (my.skill1+5) && my.flag2 == 1) 
		{
			my.skill90 = my.skill7;my.skill91 = my.skill7;my.skill92 = my.skill7;my.alpha = my.skill7;
			Remove_A_lightTYPE3(my.skill8);Remove_B_lightTYPE3(my.skill8);Remove_C_lightTYPE3(my.skill8);Remove_D_lightTYPE3(my.skill8);Remove_E_lightTYPE3(my.skill8);
			Remove_F_lightTYPE3(my.skill8);Remove_G_lightTYPE3(my.skill8);Remove_H_lightTYPE3(my.skill8);Remove_I_lightTYPE3(my.skill8);Remove_J_lightTYPE3(my.skill8);
			Remove_K_lightTYPE3(my.skill8);Remove_L_lightTYPE3(my.skill8);Remove_M_lightTYPE3(my.skill8);Remove_N_lightTYPE3(my.skill8);Remove_O_lightTYPE3(my.skill8);
			Remove_P_lightTYPE3(my.skill8);Remove_Q_lightTYPE3(my.skill8);Remove_R_lightTYPE3(my.skill8);Remove_S_lightTYPE3(my.skill8);Remove_T_lightTYPE3(my.skill8);
			Remove_U_lightTYPE3(my.skill8);Remove_V_lightTYPE3(my.skill8);Remove_W_lightTYPE3(my.skill8);Remove_X_lightTYPE3(my.skill8);Remove_Y_lightTYPE3(my.skill8);
			Remove_Z_lightTYPE3(my.skill8);
			lens_dust_flares_REMOVE();
		}
	
		wait(1);
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
action player_move
{
	camera.arc=110; my.invisible = on; my.skill10 = my.z;	
	while(1)
	{
		//STEUERUNG: pan & tilt mit der maus (rauf & runter mit den maustasten). w;a;s;d = bewegung
		//STEERING: pan & tilt with the mouse (up/down mousekeys). w;a;s;d = move camera
		if (mouse_force.x > 0 || mouse_force.x < 0) {my.pan-= 7*mouse_force.x * time;}			
		if (mouse_force.y > 0 || mouse_force.y < 0) {my.tilt += 7*mouse_force.y * time;}
		camera.x = my.x; camera.y = my.y; camera.z = my.z+50; camera.pan = my.pan;camera.tilt = my.tilt;
		my.z = my.skill10;	my.skill10 += 50 * (mouse_left - mouse_right) * time; 	my.tilt = max(-90, (min (my.tilt, 90)));
		my.skill1 = 25 * (key_w - key_s)*time; my.skill2 = -10 * (key_d - key_a)*time;
		c_move(me, my.skill1, nullvector, glide | ignore_me | ignore_sprites);
		wait(1);   
	}
}
///////////////////////////////////
action event_triggers
{
	//eine gruppe von schaltern die ein event auslösen wenn sich der spieler (oder die kamera) nähern. dabei ist skill20 die id nummer, die ein Event auslösen
	//a group of model-entitys that acts as switches. if the player or camera come close to this models, they will start an event (id is on skill20 of this model)
	my.passable = on;my.invisible = on;
	while(1)
	{
		if (my.flag5 == 0)//diese triggers(schalter) bewegen sich (so zu sagen) mit dem spieler auf deren (im WED) vorgegebenen x-y limits (skill1-2; skill3-4)
		//this triggers/switchs moves with the player/camera. use the skill1-2 (x-axis) & skill3-4 (y-axis) to limit their position. so you can control
		//an entire area and activate some events (if you don't want to use scan or trace)
		{
			//gib im wed zuerst den höchsten wert ein für skill1 dann den niedrigsten in skill2. (x-achse)  [3&4 = y -achse]
			//put on WED the highest value in skill1 (x-axis, the x-limit that this model can go) in skill2 the lowest value (x-axis). now the rest for skill3 & 4
			//(y-axis limits)
			if (camera.x < my.skill1 && camera.x > my.skill2 && my.flag1 == 1) {my.x = camera.x;}//(bewegung nur in x-achse = flag1)
			//you can limit the axis. flag1 means that this entity moves only on the x-axis. flag2 = only y-axis or both together. you can use that to control a large
			//area, out/inside a room, and outside is raining....
			if (camera.y < my.skill3 && camera.y > my.skill4 && my.flag2 == 1) {my.y = camera.y;}//(bewegung nur in y-achse = flag2) oder dann ein mix von beiden um eine
			//quadratische fläche zu überwachen (regen aussen, aber nicht im haus)
			if (vec_dist(my.x, camera.x) < 25) {event_TRG = my.skill20;}//löse event aus wenn nahe an meiner position. START THE EVENT, take the id from my skill20 (WED)
		}
		if (my.flag5 == 1)//man kann auch ein radius kontrollieren lassen, dabei ist danach skill1 = radius-influenzierungs-bereich
		{						//you can control a radius instead a square place. (use only skill1)
			if (vec_dist(my.x, camera.x) < my.skill1) {event_TRG = my.skill20;}
		}
		my.z = camera.z;//immer auf gleicher höhe des spielers setzen lassen (oder der kamera...). PUT THIS MODELS ON THE SAME HEIGHT AS THE CAMERA/PLAYER

		if (event_TRG == 1) {sun_start = 1;event_TRG=0;}//starte und zeige sonnen flares. 			START/STOP SUN TRACE & FLARES
		if (event_TRG == 2) {sun_start = 0;event_TRG=0;}//stoppe sonnen flares

		//für die lens-dust-flares, falls man die camera.arc ständig ändert, könnte man diese option in betracht ziehen:
		//you can use this lines only if the camera.arc changes during the game. maybe there is a better way to fix the dust-flares, while the arc changes.
		//NOTE that the scale & the position of the flares changes too with the cam.arc!
		if (camera.arc > 119) {my.skill30 = (camera.arc-110)*2; CA = camera.arc - my.skill30;}
		if (camera.arc < 100) {my.skill30 = (110-camera.arc)*2; CA = camera.arc + my.skill30;}
		//etwas umständlich, ich weiss. sollte man die camera.arc auf 110 belassen dann kann man alle zusätzlichen angaben wie: "*(camera.arc/CA);" von den zeilen:
		//"LF_pointer.scale_x = 1*(camera.arc/CA);LF_pointer.scale_y = 1*(camera.arc/CA);" [ab function Init_DIRT1(LF_number)....] entfernen lassen. 
		wait(1);
	}
}
///////////////////////////////////
action STATUE		{ent_move(nullvector, nullvector);}