Page 1 of 1

script help

Posted: January 20th, 2012, 2:15 pm
by Turbo2233
hi guys i need help on a script i want my door to open if a player press use key can you post a script that will do that

thanks

Re: script help

Posted: January 20th, 2012, 2:34 pm
by Goro92

Code: Select all

main()
{
thread door1_rotate();
}
door1_rotate()
{
door1 = getent("door", "targetname");
trig = getent("trig_door", "targetname");
while (1)
{
trig waittill("trigger");
door1 playsound("dooropen");
door1 rotateyaw(90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
wait (3);
door1 playsound("doorclose");
door1 rotateyaw(-90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
}
}
in mp_yourmapname.gsc you have to put this:

Code: Select all

main()
{
maps\mp\_load::main(); 
maps\mp\mp_filename::main();
}

Re: script help

Posted: January 20th, 2012, 4:11 pm
by Turbo2233
doesnt work i get could not find maps/mp/_open.gsc

Re: script help

Posted: January 20th, 2012, 5:24 pm
by Pedsdude
Turbo2233 wrote:doesnt work i get could not find maps/mp/_open.gsc
I'm guessing you meant "maps/mp/mp_open.gsc"?

A .gsc file isn't automatically created for your map, you have to make one from scratch. If that's the case, copy Goro92's code, paste it into wordpad/notepad and save as mp_open.gsc

Re: script help

Posted: January 20th, 2012, 5:28 pm
by Turbo2233
Pedsdude wrote:
Turbo2233 wrote:doesnt work i get could not find maps/mp/_open.gsc
I'm guessing you meant "maps/mp/mp_open.gsc"?

A .gsc file isn't automatically created for your map, you have to make one from scratch. If that's the case, copy Goro92's code, paste it into wordpad/notepad and save as mp_open.gsc
nvm i got the anser from this link

http://modsonline.com/Tutorials-read-658.html

thanks goro

Re: script help

Posted: January 20th, 2012, 5:37 pm
by Pedsdude
Yes, thanks Goro for wasting your time responding to someone who clearly pays no attention to advice and then uses a tutorial he could have viewed before posting in the first place! :roll: