Door Scripting

bangingbernie
bangingbernie
Kleine Erklärung:

Mehrere brushes mit targetnames



Script von der Main map GSC aufgerufen:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
function main() 
{ 
	thread slidedoor_slider (); 
} 
function slidedoor_slider() 
{ 
	slidedoor1 = getent( "slidedoor1", "targetname" );
	slidedoor2 = getent( "slidedoor2", "targetname" ); 
	slidedoor3 = getent( "slidedoor3", "targetname" );
	slidedoor4 = getent( "slidedoor4", "targetname" ); 
	slidedoor4 = getent( "slidedoor4", "targetname" ); 
	doorrail1 = getent( "doorrail1", "targetname" );
	doorrail2 = getent( "doorrail2", "targetname" );  
	trig      = getent( "slidetrig", "targetname" ); 
 
	while(true) 
	{ 
		trig waittill ("trigger"); 
		doorrail1 movey ( -60, 2, 0.5, 0.5); 
		doorrail2 movey ( 60, 2, 0.5, 0.5); 
		slidedoor3 movey ( -25, 2, 0.5, 0.5); 
		slidedoor4 movey ( 25, 2, 0.5, 0.5); 
		slidedoor1 movez ( 62, 2, 0.5, 0.5); 
		slidedoor2 movez ( -42, 2, 0.5, 0.5);
		slidedoor3 waittill ("movedone");
		wait 3; 
		doorrail1 movey ( 60, 2, 0.5, 0.5); 
		doorrail2 movey ( -60, 2, 0.5, 0.5); 
		slidedoor3 movey( 25, 2, 0.5, 0.5); 
		slidedoor4 movey( -25, 2, 0.5, 0.5); 
		slidedoor1 movez( -62, 2, 0.5, 0.5); 
		slidedoor2 movez( 42, 2, 0.5, 0.5); 
		slidedoor3 waittill ("movedone"); 
	} 
}



Quelle: Mappers United