Call of Duty 4: Moving Brushes: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
==Draglift Door== | ==Draglift Door== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 33: | Line 33: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Draw bridge== | ==Draw bridge== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 59: | Line 59: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Lift Pad== | ==Lift Pad== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 86: | Line 86: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Roller Door== | ==Roller Door== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 113: | Line 113: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Slide Door== | ==Slide Door== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 140: | Line 140: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Train door== | ==Train door== | ||
< | <syntaxhighlight> | ||
main() | main() | ||
{ | { | ||
Line 152: | Line 152: | ||
train_slider() | train_slider() | ||
{ | { | ||
train =getent( "train", "targetname"); | train = getent( "train", "targetname"); | ||
trig =getent( "traintrig", "targetname"); | trig = getent( "traintrig", "targetname"); | ||
while(true) | while(true) | ||
Line 167: | Line 167: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
==Train door 2== | ==Train door 2== | ||
< | <syntaxhighlight> | ||
main() | |||
{ | { | ||
thread traindoor_traindoor (); | |||
thread traindoor_traindoor (); | |||
} | } | ||
traindoor_traindoor() | traindoor_traindoor() | ||
{ | { | ||
door=getent("traindoor","targetname"); | door = getent( "traindoor", "targetname" ); | ||
wait | // wait 20; | ||
trig=getent(" | trig = getent( "traindoortrig", "targetname" ); | ||
while( | |||
{ | while(true) | ||
trig waittill ("trigger"); | { | ||
door | trig waittill ("trigger"); | ||
door waittill ("movedone"); | door moveY ( 2, 1, 0.5, 0.5 ); | ||
wait | door waittill ("movedone"); | ||
door | |||
door waittill ("movedone"); | wait 1; | ||
wait | door moveX ( -50, 4, 1, 1 ); | ||
door | door waittill ("movedone"); | ||
door waittill ("movedone"); | |||
wait | wait 4; | ||
door | door moveX ( 50, 4, 1, 1 ); | ||
door waittill ("movedone"); | door waittill ("movedone"); | ||
} | |||
} </ | wait 1; | ||
door moveY ( -2, 1, 0.5, 0.5 ); | |||
door waittill ("movedone"); | |||
} | |||
} | |||
</syntaxhighlight> | |||
==Trap Door== | ==Trap Door== | ||
< | <syntaxhighlight> | ||
main() | |||
{ | { | ||
thread | thread trapdoor(); | ||
} | } | ||
trapdoor() | |||
{ | { | ||
trapdoor=getent("trapdoor","targetname"); | trapdoor = getent( "trapdoor", "targetname" ); | ||
trig=getent(" | trig = getent( "trapdoortrig", "targetname" ); | ||
while( | |||
{ | while(true) | ||
trig waittill ("trigger"); | { | ||
trapdoor rotateto( (0,0,-90),0.3); | trig waittill ("trigger"); | ||
trapdoor waittill ("rotatedone"); | trapdoor rotateto( ( 0, 0, -90 ), 0.3); | ||
wait | trapdoor waittill ("rotatedone"); | ||
trapdoor rotateto( (0,0,0),1.7); | |||
trapdoor waittill ("rotatedone"); | wait 3; | ||
} | trapdoor rotateto( ( 0, 0, 0 ), 1.7); | ||
} </ | trapdoor waittill ("rotatedone"); | ||
} | |||
} | |||
</syntaxhighlight> | |||
==Sources== | ==Sources== | ||
[http://itoeunited.net/forum/viewtopic.php?t=1235 | [http://itoeunited.net/forum/viewtopic.php?t=1235 Broken Link] | ||
[http://www.xfire.com/profile/rasmuswennerstrom Fixz] |
Latest revision as of 15:14, 16 December 2010
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(true)
{
//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(true)
{
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(true)
{
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( "doortrig", "targetname" );
while(true)
{
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( "slidetrig", "targetname" );
while(true)
{
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( "traintrig", "targetname");
while(true)
{
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( "traindoortrig", "targetname" );
while(true)
{
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();
}
trapdoor()
{
trapdoor = getent( "trapdoor", "targetname" );
trig = getent( "trapdoortrig", "targetname" );
while(true)
{
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");
}
}