Script help

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Rukariox
CJ Wannabe
CJ Wannabe
Posts: 34
Joined: July 30th, 2009, 7:30 pm

Script help

Post by Rukariox » October 23rd, 2009, 11:52 am

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");
}
}

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Script help

Post by Rezil » October 23rd, 2009, 1:09 pm

Check if your targetnames match those in Radiant.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Rukariox
CJ Wannabe
CJ Wannabe
Posts: 34
Joined: July 30th, 2009, 7:30 pm

Re: Script help

Post by Rukariox » October 23rd, 2009, 5:01 pm

all the targetnames are correct.

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: Script help

Post by Nightmare » October 23rd, 2009, 6:26 pm

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.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Script help

Post by Drofder2004 » October 23rd, 2009, 7:57 pm

origins/script_origins correctly setup?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Rukariox
CJ Wannabe
CJ Wannabe
Posts: 34
Joined: July 30th, 2009, 7:30 pm

Re: Script help

Post by Rukariox » October 23rd, 2009, 8:57 pm

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??

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Script help

Post by waywaaaard » October 24th, 2009, 2:14 pm

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
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

Rukariox
CJ Wannabe
CJ Wannabe
Posts: 34
Joined: July 30th, 2009, 7:30 pm

Re: Script help

Post by Rukariox » October 25th, 2009, 7:56 pm

working now thx all

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests