Advancing Spawns

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Advancing Spawns

Post by MPowell1944 »

I want to script spawns that advance as a team advances. I am adding these spawns to a SP map and I am just wondering if I am doing it right. I create 1 set of home spawns for each team. Then I create layers of spawns with targetnames that have numbers so that I can enable disable them. Then I place triggers at certain waypoints. Once a team hits the trigger, it disables the other team's next set of spawns and enables the advancing team's next set of spawns. What I need to know is how could I do this effectively. Would I have to set a variable when you hit the trigger? Seems confusing, but it is done very well on the LMAO server. Thanks.
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Your going to have to give the spawns targetnames, then disable them until the play advances. A way of detecting if a player advances is by using triggers. So, if an allies player steps into the trigger, enable the advancing spawn.
Admin @ Unrealmod
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Unreal, I mean no offence, but I think Powell's better at this than most of us. ;)

Yeah, I would use variables for that if I were you. :P
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

I know a bit Rookie, but I still have a bit to learn. ;)

If you have not played on the LMAO server, I suggest you stop by sometime. King's Push Engine makes TDM a whole lot better. Right now I have an objective server running SP maps ( he runs SP as well ), but I wanted to do something like he has done.

Thanks for the feedback, both of you.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

And it does. parm.other, not param.other. ;) You could also have

Code: Select all

   if(level.some_variable_name_you_like != 1) {
instead of

Code: Select all

   if(level.some_variable_name_you_like == 1) {
      // Do nothing ( it has already been activated )
   } else { 
And

Code: Select all

enablespawn $the_targetname_of_the_spawn_group
won't work, it should be

Code: Select all

$the_targetname_of_the_spawn_group enablespawn
That's all I've got to say about this. ;)

<EDIT>WTF? It inserted my post befor Bjarne's... :?</EDIT>
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Are you asking fore something like this?

Code: Select all

triggered_by_a_setthread_in_a_trigger:
	if(level.some_variable_name_you_like == 1) {
		// Do nothing ( it has already been activated )
	} else {
		if(param.other.dmteam == axis) // or allies, whaterver you like
		{
			level.some_variable_name_you_like = 1
			enablespawn $the_targetname_of_the_spawn_group // or enable
		}
	}
end
( scrript off the top of my head, may have errors )
Admin .MAP Forums
Image
Head above heels.
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

I am more or less worried about trigger placement to make things even between teams. What if the 2 teams hit the same trigger ( this meaning 2 triggers on either sides of a building that set the same thread ) at the same time.

Unfortunately with the LMAO group, they give no information about how their mods are made. I understand that they don't want people having exactly what they have, but they won't even drop any hints.
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Rookie One wrote:Unreal, I mean no offence, but I think Powell's better at this than most of us. ;)
Ok, i'll think i'll stay at TMT.
Admin @ Unrealmod
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Demon, don't take offense to what he said. I don't think he has seen any of your work yet.

I appreciate all of the help you have given me in the past.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Unreal_Demon wrote:Ok, i'll think i'll stay at TMT.
I dont think he ment any harm. If he did I'll slap him silly.

Welcome to .Map Unreal_Demon! :D
Admin .MAP Forums
Image
Head above heels.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

MPowell1944 wrote:I am more or less worried about trigger placement to make things even between teams. What if the 2 teams hit the same trigger ( this meaning 2 triggers on either sides of a building that set the same thread ) at the same time.
They will never set the same thread, a new execution thread will be created each trigggering.

For a better example: search for my "wave objective mode script" that uses triggers to advance spawn locations in a TOW kind of way.

Or just take this link /forum/viewtopic.php?t=6286
Admin .MAP Forums
Image
Head above heels.
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Thanks MPowell, thanks Bjarne.

I think his post put me off a bit.
Admin @ Unrealmod
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Whoops... :oops: Slap me, then... Sorry... :oops: :oops: :oops:

BTW, Powell, how about doing it the same way as in RTCW or ET? I mean, do the 'home' spawns, and then make the others shared between the teams? A team would capture a spawn by touching a flag.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

I didn't want to involve any capture spawns. The idea of a set of home spawns and layers of shared spawns inbetween is what I had in mind.
Ski
Lance Corporal
Posts: 24
Joined: Tue Dec 07, 2004 12:51 am

Post by Ski »

I am working on this as well. I named all the spawns and placed triggers to advance them. The triggers are placed so that only a certain team can activate them.

For example when allies advance past a certain point they activate a trigger that only team allied players can trip and advance their spawns, while pushing axis spawns back... but if axis go thru trigger it does not affect spawns...

Here is an example

///Spawn Trigger 1.. allies pushing axis back - 1st change

local.trig = spawn trigger_multiple "targetname" "allies1"
local.trig.origin = ( 1216 -211 -255 ) // position it
local.trig setsize ( 0 -5 0) ( 1 50 200) // give it some size
local.trig setthread spawnchange1
local.trig wait 1
local.trig delay 0 // How long before trig acts

spawnchange1:

local.player = parm.other
if ( local.player.dmteam=="allies" )
{

$allied1 disablespawn
$allied2 disablespawn
$allied3 disablespawn
$allied4 disablespawn
$allied5 disablespawn

$allied6 enablespawn
$allied7 enablespawn
$allied8 enablespawn
$allied9 enablespawn

$axis1 disablespawn
$axis2 disablespawn
$axis3 disablespawn
$axis4 disablespawn
$axis5 disablespawn

$axis6 enablespawn
$axis7 enablespawn
$axis8 enablespawn
$axis9 enablespawn
}
end

I then placed triggers that only Axis team will trigger... this in turn switches spawns as well.. this gives the push affect I seen on LMAO.
I have played on LMAO server and I also like what they have done.

I would also like to create the push meter they have... but have not figure out how to draw it in using hud draw. Do you have any idea's??

Ski
Post Reply