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

Members Online

»
0 Active | 61 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: floodspawning in cod2
Snake-nl
General Member
Since: May 30, 2004
Posts: 394
Last: Jan 23, 2011
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 08:30 pm
******* script runtime error *******
undefined is not an object: (file 'maps/testsp.gsc', line 80)
trig waittill("trigger");
*
called from:
(file 'maps/testsp.gsc', line 16)
thread wave_1();
*
started from:
(file 'maps/testsp.gsc', line 5)
main()
*
************************************
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 08:33 pm
How about just using a trigger to flood_spawn! Just as a test to make sure that the map/script works okay without the wave_1 thread.

You can always start it as triggeroff(); and then turn it on after other events or a certain amount of time has elapsed.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 10:14 pm
LOL you guys just go round in circles! [crazy]

Look closely!

wave_1()
{

trig = getent("trwave_1 ","targetname");
trig waittill("trigger");

spawners = getentarray("wave_1", "targetname");
level thread maps\_spawner::spawnerflood_spawn (spawners);
for (i=0; i < spawners[ i ].size; i++ )
{
if(isDefined(spawners[ i ])
{
spawners[ i ] stalingradspawn();
}
}
}

The red highlighted text should not be there.
And I would get rid of the isDefined check, it's not really needed I dont think.

Code:
wave_1()
{
trig = getent("trwave_1 ","targetname");
trig waittill("trigger");
spawners = getentarray("wave_1", "targetname");
level thread maps\_spawner::spawnerflood_spawn(spawners);
 for (i=0 ; i < spawners.size ; i++ )
  spawners[i] stalingradspawn();
}



Try that.
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 10:31 pm
Oops, think that extra [index] was my fault! [tongue]
Share |
Snake-nl
General Member
Since: May 30, 2004
Posts: 394
Last: Jan 23, 2011
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 10:45 pm
hmmm still something wrong with the trig [confused]


******* script runtime error *******
undefined is not an object: (file 'maps/testsp.gsc', line 79)
trig waittill("trigger");
*
called from:
(file 'maps/testsp.gsc', line 16)
thread wave_1();
*
started from:
(file 'maps/testsp.gsc', line 5)
main()
*
************************************
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 11:06 pm
Stop the Merry-Go-Round! Here's the solution, I tested it so it does work.

This is the code for the thread:

Code:

wave1()
{

trig = getent("trwave_1", "targetname");
trig waittill("trigger");

	spawners = getentarray("wave_1","targetname");
	level thread maps\_spawner::spawnerflood_spawn(spawners);
	for(i=0;i<spawners.size;i++)
	{
  	if(isdefined(spawners[i]))
		{
			spawners[i] stalingradspawn();
		}
	}

}


I renamed the thread to wave1 but that ain't important.

What is important is you need to give your AI to floodspawn the key of
Quote:

key: script_forcespawn
value: 1


If you don't then only the first spawn will be stalingradspawn and all others will be normal, eg: the player must have cover between him and the next spawners.

phew.... [duh]
Share |
Snake-nl
General Member
Since: May 30, 2004
Posts: 394
Last: Jan 23, 2011
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 11:18 pm


thx it is working now [thumbs_up]

love this forum [biggrin]
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Tuesday, May. 22, 2007 11:19 pm
Another mystery of the Universe solved! [casanova]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 12:32 am
Phew thank the God's I was getting dizzy! [crazy]
Share |
babycop
General Member
Since: Feb 18, 2006
Posts: 488
Last: Feb 27, 2010
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 02:50 am
Yorkshire does it again! I'm putting this thread in my favorites....

[cool]
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP 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

»