Page 1 of 1
					
				Script help
				Posted: October 23rd, 2009, 11:52 am
				by Rukariox
				Hi,
I just started scripting and created my own.
it's a pretty simple script but it doesn't even work  
 
 
here is the code
Code: Select all
main()
{
thread Door();
}
Door()
{
Door = getent ("Door1","targetname");
trigger = getent ("trig_door1","targetname");
while(1)
{
trigger waittill ("trigger");
Door moveZ (-88,2,0.5,0.5);
wait(5);
Door moveZ (88,2,0.5,0.5);
Door waittill ("movedone");
}
}
 
			
					
				Re: Script help
				Posted: October 23rd, 2009, 1:09 pm
				by Rezil
				Check if your targetnames match those in Radiant.
			 
			
					
				Re: Script help
				Posted: October 23rd, 2009, 5:01 pm
				by Rukariox
				all the targetnames are correct.
			 
			
					
				Re: Script help
				Posted: October 23rd, 2009, 6:26 pm
				by Nightmare
				Are you sure that the file is an actual gsc file and not a text file with the extension .gsc.txt?
Also, check to make sure it's in the right spot, right beside the BSP file in the maps/mp.
			 
			
					
				Re: Script help
				Posted: October 23rd, 2009, 7:57 pm
				by Drofder2004
				origins/script_origins correctly setup?
			 
			
					
				Re: Script help
				Posted: October 23rd, 2009, 8:57 pm
				by Rukariox
				maybe i know what is wrong...
i think the gsc file doesn't start..
but if you have a map called Door and a Door.gsc file will it launch the gsc file automaticly??
and btw is the script correct??
			 
			
					
				Re: Script help
				Posted: October 24th, 2009, 2:14 pm
				by waywaaaard
				please ensure you have the windows folder options - hide file extenions for known files off, otherwise you have a Doors.gsc.txt and it won't be loaded
test your gsc with a simple 
wait 5;
iprintbold("testmessage"); 
and look if something appears
			 
			
					
				Re: Script help
				Posted: October 25th, 2009, 7:56 pm
				by Rukariox
				working now thx all