Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 5 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: 2 pane doors
kcscaboosekid
General Member
Since: Jun 5, 2006
Posts: 21
Last: Nov 11, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Oct. 31, 2006 06:41 pm
I have a sctript for a baydoor I am working on and everthing should be right, but, I am getting script errors from the Game, whats wrong with it? All the console says is bad syntax. no line for errorr or anything.

called from main .gsc:

maps\mp\mp_townraid_lid::main();

mp_townraid_lid:

main()
{
thread door_open();
thread light_flash();

}

door_open()
{
door = getent("lid1", "targetname");
trig = getent("trig1", "targetname");
lip = getent("lip1" , "targetname");
switch = getent("switch1","targetname");
while (1)
{
trig waittill("trigger");
wait 2;
door moveto((0, 503, 0),20,5,5);
lip moveto((0,0,-52),20,5,5);
door waittill("movetodone");
trig waittill("trigger");
wait 2;
door moveto((0, -503, 0),20,5,5);
lip moveto((0,0,52),20,5,5);
door waittill("movetodone");
}
}
thread light_flash();
{
trig = getent("trig1", "targetname");
light = getent("light1", "targetname");
trig waittill("trigger");
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;
light moveto((0,0,-23),.1,0,0);
wait 1;
light moveto((0,0,23),.1,0,0);
wait 1;


}
}


edited on Oct. 31, 2006 01:42 pm by kcscaboosekid

edited on Oct. 31, 2006 01:43 pm by kcscaboosekid
Share |
sharkeh
General Member
Since: Sep 24, 2006
Posts: 20
Last: Dec 1, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Oct. 31, 2006 06:50 pm
thread light_flash();
{

remove the semicolon.
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Oct. 31, 2006 07:38 pm
If you don't get a line which the error is on in the console, enter /developer 1 before loading your map. You'll then get a better description of the error, including its location
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, Oct. 31, 2006 08:13 pm
Remove the text in red. [idea]

thread light_flash();
{
trig = getent("trig1", "targetname");
light = getent("light1", "targetname");
trig waittill("trigger");

And remove the extra } at the bottom of the script
Grassy

edited on Oct. 31, 2006 03:15 pm by WHC_Grassy
Share |
kcscaboosekid
General Member
Since: Jun 5, 2006
Posts: 21
Last: Nov 11, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Nov. 1, 2006 03:12 am
Could I substitute the moveto with a hide/show loop? If so how do you get it to work with the lights? (i am trying to make a light that changes color to red when the bay opens and flashes while the doors are in motion).
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Wednesday, Nov. 1, 2006 07:16 pm
Ive tried hide/show before in UO with no success on brush_models with a light value. Best to just define it's origin from one spot to another, same as your moveto lines but simpler to type [biggrin]

Grassy
Share |
kcscaboosekid
General Member
Since: Jun 5, 2006
Posts: 21
Last: Nov 11, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Nov. 2, 2006 02:46 pm
Is there a command that changes light values?[idea]

ie. light setkey("intensity",".5")

or something like that?
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»