Call of Duty 4: Moving Brushes: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
[[Image:Nutshell.png]] These script are to be used in conjunction with proper Targetname on brushes in Radiant. They are not standalone  -- just for reference.
[[Image:Nutshell.png]] These script are to be used in conjunction with proper Targetname on brushes in Radiant. They are not standalone  -- just for reference.


[b]<font color=green>1. Draglift Door</font> [/b]
<font color=green>==Draglift Door==</font>


<pre>main()  
<pre>main()  
Line 30: Line 30:




<font color=green>[b]2. Draw bridge[/b] </font>  
<font color=green>==Draw bridge==</font>  


<pre>main()  
<pre>main()  
Line 54: Line 54:




[b]<font color=green>3. Lift Pad </font> [/b]
<font color=green>==Lift Pad==</font>


<pre>main()  
<pre>main()  
Line 79: Line 79:
} </pre>  
} </pre>  


[b]<font color=green>4. Roller Door</font>[/b]
<font color=green>==Roller Door==</font>  


<pre>main()  
<pre>main()  
Line 104: Line 104:
} </pre>  
} </pre>  


[b]<font color=green>5. Slide Door </font> [/b]
<font color=green>==Slide Door==</font>  


<pre>main()  
<pre>main()  
Line 129: Line 129:
} </pre>  
} </pre>  


[b]<font color=green>6. Train door</font> [/b]
<font color=green>==Train door==</font>


<pre>main()  
<pre>main()  
Line 154: Line 154:
} </pre>  
} </pre>  


[b]<font color=green>7. Train door2</font> [/b]
<font color=green>==Train door 2==</font>


<pre>main()  
<pre>main()  
Line 184: Line 184:
} </pre>  
} </pre>  


[b]<font color=green>8. Trap Door</font> [/b]
<font color=green>==Trap Door==</font>


<pre>main()  
<pre>main()  

Revision as of 01:12, 17 October 2008

This tutorial assumes that you already know how to create, compile & create GSCs,CSVs & FastFiles for your maps

These script are to be used in conjunction with proper Targetname on brushes in Radiant. They are not standalone -- just for reference.

==Draglift Door==

main() 
{ 
thread diaglift_slider (); 
} 

diaglift_slider() 
{ 
diaglift=getent("diaglift","targetname"); 
wait (5); 
while(1) 
{ 
//trig waittill ("trigger"); 
diaglift moveto ((104,-125,124),6,2,2); 
diaglift waittill ("movedone"); 
wait (5); 
//trig waittill ("trigger"); 
diaglift moveto ((-35,-125,204),6,2,2); 
diaglift waittill ("movedone"); 
wait (5); 
} 
} 


==Draw bridge==

main() 
{ 
thread drawbridge_open (); 
} 

drawbridge_open() 
{ 
drawbridge=getent("drawbridge","targetname"); 
trig=getent("lower_bridge","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
drawbridge rotateto( (-90,0,0),6); 
drawbridge waittill ("rotatedone"); 
wait (3); 
trig waittill ("trigger"); 
drawbridge rotateto( (0,0,0),6); 
drawbridge waittill ("rotatedone"); 
} 
} 


==Lift Pad==

main() 
{ 
thread liftpad_slider (); 
} 

liftpad_slider() 
{ 
liftpad=getent("liftpad","targetname"); 
trig=getent("lift_trigger","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
//wait (4); 
liftpad movez (106,5,0,0.6); 
liftpad waittill ("movedone"); 
wait (4); 
//trig waittill ("trigger"); 
liftpad movez(-106,4,0,0.6); 
liftpad waittill ("movedone"); 

} 
} 

==Roller Door==

main() 
{ 
thread door_slider (); 
} 

door_slider() 
{ 
door=getent("door","targetname"); 
trig=getent("openthedoor","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
//wait (4); 
door movez (94,5,0,0.6); 
door waittill ("movedone"); 
wait (4); 
//trig waittill ("trigger"); 
door movez(-94,4,0,0.6); 
door waittill ("movedone"); 

} 
} 

==Slide Door==

main() 
{ 
thread slidedoor_slider (); 
} 

slidedoor_slider() 
{ 
slidedoor=getent("slidedoor","targetname"); 
trig=getent("slideopen","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
//wait (4); 
slidedoor movey (-64,2,0.5,0.5); 
slidedoor waittill ("movedone"); 
wait (4); 
//trig waittill ("trigger"); 
slidedoor movey(64,2,0.5,0.5); 
slidedoor waittill ("movedone"); 

} 
} 

==Train door==

main() 
{ 
thread train_slider (); 
} 

train_slider() 
{ 
train=getent("train","targetname"); 
trig=getent("start_train","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
//wait (4); 
train movex (-464,8,0.3,0.3); 
train waittill ("movedone"); 
wait (4); 
//trig waittill ("trigger"); 
train movex(464,8,0.3,0.3); 
train waittill ("movedone"); 

} 
} 

==Train door 2==

main() 
{ 

thread traindoor_traindoor (); 
} 

traindoor_traindoor() 
{ 
door=getent("traindoor","targetname"); 
wait (20); 
trig=getent("traindoor_trigger","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
door movey (2,1,0.5,0.5); 
door waittill ("movedone"); 
wait (1); 
door movex (-50,4,1,1); 
door waittill ("movedone"); 
wait (4); 
door movex (50,4,1,1); 
door waittill ("movedone"); 
wait (1); 
door movey (-2,1,0.5,0.5); 
door waittill ("movedone"); 
} 
} 

==Trap Door==

main() 
{ 
thread trapdoor_droptrapdoor (); 
} 

trapdoor_droptrapdoor() 
{ 
trapdoor=getent("trapdoor","targetname"); 
trig=getent("droptrapdoor","targetname"); 
while(1) 
{ 
trig waittill ("trigger"); 
trapdoor rotateto( (0,0,-90),0.3); 
trapdoor waittill ("rotatedone"); 
wait (3); 
trapdoor rotateto( (0,0,0),1.7); 
trapdoor waittill ("rotatedone"); 
} 
} 

Sources

Here