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

Members Online

»
0 Active | 6 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Advanced spawning commands?
*Delta*Obi-Wan
General Member
Since: Jul 16, 2007
Posts: 233
Last: Dec 24, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Tuesday, Jun. 2, 2009 06:07 pm
OK, im using this code for flood spawning:

spawners = getentarray("auto178", "targetname");
level thread maps\_spawner::flood_spawner_scripted (spawners);
for (i=0; i < spawners.size; i++ )
{
// if(isalive(spawners))
{
spawners dospawn();
}
}

what i need to know is how can i make AI spawn ONLY by code, and not immediantly after i hit the trigger. Example, you hit the trigger, wait a few secconds and then the AI starts to spawn?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Wednesday, Jun. 3, 2009 12:35 am
not sure if you have to give the spawner or the trigger this KVP:

script_delay 30 (seconds?)

Quote:
float script_delay // Action will be delayed for this long before triggering
float script_delay_min // Minimum delay before action is triggered
float script_delay_max // Maximum delay before action is triggered


cod4_radiant_keys.zip
Share |
pinedsman
General Member
Since: Feb 27, 2007
Posts: 85
Last: Nov 28, 2012
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Wednesday, Jun. 3, 2009 02:31 am
If you want to do it *all* in script, you could do something like

Code:

trigg = getent( "your_trigger_name_here", "targetname" );
trigg waittill ("trigger");
wait( 30.0 ); //wait 30 seconds after triggering

//do whatever you want




does that help?
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 04:09 am
I think that for flood spawning theres no way to get around the trigger. i havent seen a way around that. But then again im still new at the sp yet i havent seen anything of that which you are searching because i was in a similar situation trying to find a flood spawn using script only and no luck. if you do find it plz post how, i would also like to know how to. thanks.
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 06:09 am
You could use a flag?
as in:

Code:

thread()
{
flag_wait("spawn_go");
spawners = getentarray("auto178", "targetname");
level thread maps\_spawner::flood_spawner_scripted (spawners);

for (i=0; i < spawners.size; i++ )
{
spawners dospawn();
}

}




You would just have to init the flag, and set it by some other means.
Share |
*Delta*Obi-Wan
General Member
Since: Jul 16, 2007
Posts: 233
Last: Dec 24, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 07:37 am
Mr.Cache writes...
Quote:
You could use a flag?
as in:

Code:

thread()
{
flag_wait("spawn_go");
spawners = getentarray("auto178", "targetname");
level thread maps\_spawner::flood_spawner_scripted (spawners);

for (i=0; i < spawners.size; i++ )
{
spawners dospawn();
}

}




You would just have to init the flag, and set it by some other means.


I think thats a good idea only one question, Do I need to have a trigger targeting the AI ( trigger spawn ticked on ), or i can have them spawn wherever they are after the flag is initiated?
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 08:06 am
Quote:
I think thats a good idea only one question, Do I need to have a trigger targeting the AI ( trigger spawn ticked on ), or i can have them spawn wherever they are after the flag is initiated?


Judging by your script they should spawn where they are with no trigger needed.
Share |
*Delta*Obi-Wan
General Member
Since: Jul 16, 2007
Posts: 233
Last: Dec 24, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 10:32 am
Mr.Cache writes...
Quote:
Quote:
I think thats a good idea only one question, Do I need to have a trigger targeting the AI ( trigger spawn ticked on ), or i can have them spawn wherever they are after the flag is initiated?


Judging by your script they should spawn where they are with no trigger needed.


OK I will try that now...
Share |
pinedsman
General Member
Since: Feb 27, 2007
Posts: 85
Last: Nov 28, 2012
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 01:18 pm
I understand now... you want to trigger a flood and secure trigger, so you can't name it something like "wave_1" because it's named "flood_and_secure"

Well!

what you can do is *don't* name your trigger "flood_and_secure" and *don't* have it target any spawners. If you want to do it all in script, then do something like...

Code:

trigg = getent( "my_trigger", "targetname" );
trigg waittill( "trigger" );
wait(30.0); //wait 30 seconds after trigger
enemy_array = getentarray( "my_spawners", "targetname" );
flood_and_secure_scripted( enemy_array );


you will need to import maps/util but i bet you already did that :)
Share |
*Delta*Obi-Wan
General Member
Since: Jul 16, 2007
Posts: 233
Last: Dec 24, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 4, 2009 02:10 pm
pinedsman writes...
Quote:
I understand now... you want to trigger a flood and secure trigger, so you can't name it something like "wave_1" because it's named "flood_and_secure"

Well!

what you can do is *don't* name your trigger "flood_and_secure" and *don't* have it target any spawners. If you want to do it all in script, then do something like...

Code:

trigg = getent( "my_trigger", "targetname" );
trigg waittill( "trigger" );
wait(30.0); //wait 30 seconds after trigger
enemy_array = getentarray( "my_spawners", "targetname" );
flood_and_secure_scripted( enemy_array );


you will need to import maps/util but i bet you already did that :)


Ive done that, but unfortuantely the game crashes when i touch that trigger :(
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»