| Author |
Topic: Advanced spawning commands? |
| *Delta*Obi-Wan |
 |
General Member Since: Jul 16, 2007 Posts: 233 Last: Dec 24, 2010 [view latest posts] |
|
|
 |
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
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 |
 |
|
|
| pinedsman |
 |
General Member Since: Feb 27, 2007 Posts: 85 Last: Nov 28, 2012 [view latest posts] |
|
|
|
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? |
 |
|
|
| voidsource |
General Member Since: May 5, 2007 Posts: 1513 Last: Sep 1, 2013 [view latest posts] |
|
|
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
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. |
 |
|
|
| *Delta*Obi-Wan |
 |
General Member Since: Jul 16, 2007 Posts: 233 Last: Dec 24, 2010 [view latest posts] |
|
|
 |
|
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? |
 |
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
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. |
 |
|
|
| *Delta*Obi-Wan |
 |
General Member Since: Jul 16, 2007 Posts: 233 Last: Dec 24, 2010 [view latest posts] |
|
|
 |
|
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... |
 |
|
|
| pinedsman |
 |
General Member Since: Feb 27, 2007 Posts: 85 Last: Nov 28, 2012 [view latest posts] |
|
|
|
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 :) |
 |
|
|
| *Delta*Obi-Wan |
 |
General Member Since: Jul 16, 2007 Posts: 233 Last: Dec 24, 2010 [view latest posts] |
|
|
 |
|
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 :( |
 |
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|