Page 1 of 1
help with door script
Posted: January 28th, 2012, 2:17 pm
by Turbo2233
hi guys i am looking for a script that will open a door when pressed with use key and auto close after
thanks
Re: help with door script
Posted: January 28th, 2012, 3:10 pm
by Levcek
make a new gsc called _door.gsc or something and put that in
main()
{
thread door();
}
door()
{
door = getent("door", "targetname"); //value,targetname in radiant
trig = getent("trig_door", "targetname"); //trigger (use use_touch trigger to make to press F)
while (1)
{
trig waittill("trigger");
door rotateyaw(90, 1.5, 0.7, 0.7);
door waittill("rotatedone");
wait (3); // Wait 3 seconds till door close (change value if u want to door close faster/slower)
door rotateyaw(-90, 1.5, 0.7, 0.7);
door waittill("rotatedone");
}
}
and now in mp_yourmapname.gsc put that in:
main()
{
mapsmp_load::main();
maps\mp\_door::main();
}
Re: help with door script
Posted: January 28th, 2012, 3:10 pm
by Turbo2233
thanks alot
Re: help with door script
Posted: January 28th, 2012, 3:14 pm
by Levcek
np.. if u got errors contact me on xf

Re: help with door script
Posted: January 28th, 2012, 3:35 pm
by Goro92
...this code is the same of this
viewtopic.php?f=29&t=14602 ...
p.s
use an origin brushes..
Re: help with door script
Posted: January 28th, 2012, 4:19 pm
by Levcek