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

Members Online

»
0 Active | 17 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
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Script problems
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 01:30 am
I have compiled my map and i have the folowing script in the separate gsc

Code:
main()	{
	trap1();
}

trap1()	{
	trap1=getentarray("trap1", "targetname");		
	trap1_trig=getent("trap1_trig", "targetname");
	while (1)	{
		trap1_trig waittill ("trigger");
		player iprintlnbold("You had ho press it, huh?");
		trap1 movez (-640, 0.1);
		trap1 waittill ("movedone");
		player iprintlnbold("Now hit a target!");
//		get_target_trig();
//		thread rotate_targets();
//		thread targets_trig1();
//		thread targets_trig2();
//		thread targets_trig3();
//		thread targets_trig4();
//		thread targets_trig5();
	}
}

get_target_trig()	{
	target1 = getentarray ("target1", "targetname");	
	target1_trig = getent ("target1_trig", "targetname");
	target1_trig enableLinkTo();
	target1_trig linkTo(trap1);
	
	target2 = getentarray ("target2", "targetname");	
	target2_trig = getent ("target2_trig", "targetname");
	target2_trig enableLinkTo();
	target2_trig linkTo(trap2);

	target3 = getentarray ("target3", "targetname");	
	target3_trig = getent ("target3_trig", "targetname");	
	target3_trig enableLinkTo();
	target3_trig linkTo(trap3);

	target4 = getentarray ("target4", "targetname");	
	target4_trig = getent ("target4_trig", "targetname");
	target4_trig enableLinkTo();
	target4_trig linkTo(trap4);

	target5 = getentarray ("target5", "targetname");	
	target5_trig = getent ("target5_trig", "targetname");
	target5_trig enableLinkTo();
	target5_trig linkTo(trap5);
}


rotate_targets()	{
	while(1)	{
		trap2 rotateroll ( -90, 1.2, 0.2, 0);
		trap2 waittill("rotatedone");
		wait(0.5);
		trap2 rotateroll ( 90, 1.2, 0.2, 0);
		wait(2);
		trap5 rotateroll ( -90, 1.2, 0.2, 0);
		trap5 waittill("rotatedone");
		wait(0.5);
		trap5 rotateroll ( 90, 1.2, 0.2, 0);
		wait(1);
		trap3 rotateroll ( -90, 1.2, 0.2, 0);
		trap3 waittill("rotatedone");
		wait(0.5);
		trap3 rotateroll ( 90, 1.2, 0.2, 0);
		wait(1.5);
		trap1 rotateroll ( -90, 1.2, 0.2, 0);
		trap1 waittill("rotatedone");
		wait(0.5);
		trap1 rotateroll ( 90, 1.2, 0.2, 0);
		wait(2.5);
		trap4 rotateroll ( -90, 1.2, 0.2, 0);
		trap4 waittill("rotatedone");
		wait(0.5);
		trap4 rotateroll ( 90, 1.2, 0.2, 0);
		wait(3);
	}
	
}




targets_trig1()	{				
	target1_trig waittill ("trigger");
	trap1 movez (640, 0.1);
}

targets_trig2()	{
	target2_trig waittill ("trigger");
	trap1 movez (640, 0.1);
}

targets_trig3()	{
	target3_trig waittill ("trigger");
	trap1 movez (640, 0.1);
}

targets_trig4()	{
	target4_trig waittill ("trigger");
	trap1 movez (640, 0.1);
}

targets_trig5()	{
		target5_trig waittill ("trigger");
		trap1 movez (640, 0.1);
}



It should work even if i didnt skip those fuctions. But when I load the map, CoD crashes. What is wrong?
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 01:58 am
attachment: text(31.4Kb)
It also seems to crash if I exclude the scrpit. Here is the map.
Share |
BA_GomerPyle
General Member
Since: Jul 26, 2012
Posts: 44
Last: May 18, 2019
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 06:25 am
Try starting your map on your computer in developer mode. If there are script errors they'll show up there.

To do this start the game and open the console using the ~ key. Type
developer 1 {enter}
devmap yourmapname {enter}

Map should then try to start. See what happens.
Hope this helps

edited on Jan. 19, 2013 11:25 pm by BA_GomerPyle
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 12:58 pm
Cod crashes. I already told you that it crashes if I don't include the line "maps\mp\traps_script::main();" in "traps.gsc" and I included the .map file so you can see whats wrong.

Can you please take a look? It would really help me.
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 01:01 pm
Maybe its something with entetys
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 03:44 pm
Ok I fixed the problem. The triger hint was wrong. But ow I get an error: "Excded maximum number of script variables." What do?
Share |
BA_GomerPyle
General Member
Since: Jul 26, 2012
Posts: 44
Last: May 18, 2019
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 07:44 pm
Check out his thread.

http://modsonline.com/Forums-top-77313.html

or this one

http://modsonline.com/Forums-top-18752.html

edited on Jan. 20, 2013 12:48 pm by BA_GomerPyle
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, Jan. 20, 2013 09:46 pm
It stops here

Code:
target1 = getentarray ("target1", "targetname");	
target1_trig = getent ("target1_trig", "targetname");
target1_trig enableLinkTo();
target1_trig linkTo(trap1);


not an entity: target1_trig linkTo(trap1);
Share |
klemen100xxx
General Member
Since: May 21, 2011
Posts: 10
Last: Jan 21, 2013
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Monday, Jan. 21, 2013 08:47 pm
How do you move an array of brushes?
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD Mapping

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

»