forward spawn flags?


(evillair) #21

Thanks sock


(Dark Killer) #22

i did everything that sock said and my spawn still isn’t selectable from the command map, i also have trigger_objective_info and everything else that needs to be there, and it doesn’t work, also when I capture the spawn by axis axis always seem to spawn there no matter if I select the default spawn in limbo mode please ive been struggling on this for like 2 days :banghead:


(sock) #23

I dont suggest anywhere in my reply adding a “trigger_objective_info” entity for the command map. The spawnpoint is on the command map because of the “team_WOLF_objective” entity. Please look at the sample map “goldrush” and the LDR for information/examples of this entity.

The “team_WOLF_checkpoint” entity (flagpole) works regardless of what you do in the script. You should see in game the pole switching flags when either team touch the pole. The Axis/Allied spawn points will not switch unless they are linked to the flag pole.

The script is really being used to switch the state of “team_WOLF_objective” entity so that it will change on the command map. If you are unsure how to create one of these entities then check the sample map “goldrush” for an example.

Sock
:moo:


(Thej) #24

Well i cant seem to get this f**king thing to work :banghead:
I want the axis to start from this spawnpoint as from another spawnpoint.
I got most of it to work, but the flag wont change from axis to allied :frowning:
I used the script from Drakir, so dont mind the wm bits.
here is my script.

// ================================================
// ============ FORWARD SPAWN ==============
// ================================================

gateflag
{
spawn
{
// accum 3 set 2 // 0-Axis, 1-Allied
}

trigger axis_capture
{

	accum 3 abort_if_not_equal 1

	accum 3 set 0

	trigger game_manager axis_flag

	setautospawn	"Main Gate Spawn"	0
	setautospawn	"Allied respawn Road"	1


	// *----------------------------------- vo ------------------------------------------*
	wm_teamvoiceannounce 0 "radar_axis_bunker_stop"

	wm_teamvoiceannounce 1 "radar_allies_bunker_capture"

	wm_addteamvoiceannounce 0 "radar_axis_bunker_stop"

	wm_addteamvoiceannounce 1 "radar_allies_bunker_capture"
	// *---------------------------------------------------------------------------------*
}

trigger allied_capture
{

	accum 3 abort_if_not_equal 0

	accum 3 set 1

	trigger game_manager allies_flag

	setautospawn	"Axis Respawn"	0
	setautospawn	"Main Gate Spawn"	1


	// *----------------------------------- vo ------------------------------------------*
	wm_teamvoiceannounce 0 "radar_axis_bunker_captured"

	wm_teamvoiceannounce 1 "radar_allies_bunker_captured"

	wm_addteamvoiceannounce 0 "radar_axis_bunker_captured"

	wm_addteamvoiceannounce 1 "radar_allies_bunker_captured"
	// *---------------------------------------------------------------------------------*

}

}

I have the follwing things in the map:

Team_wolf_checkpoint with the following keys and values:
target=gatespawns
spawnflags=1(spawnpoint checked)
scriptname=gateflag
targetname=gateflag

i have a team_wolf_objective with the following keys and values:
target=spawn1
description=Main Gate Spawn
targetname=spawn
scriptname=spawn
spawnflags=1(default axis checked)

I have a info_limbo_camera with the following keys and values:
target=spawn1

I have a few team_ctf_buespawns in there to with the following keys and values:

targetname=gatespawns
spawnflags=1(invulnerabe)

I have a few team_ctf_redspawns in there to with the following keys and values:

targetname=gatespwans
spawnflags=1(invulnerabe)

And the last bit i have is a trigger_obj_info with the following keys and values:

track=Main Gate
target=gateflag
shortname=Main Gate
spawnflags=19(axis_objective, allied_objective, is_objective checked)

I hope someone can help me out here.

grts Thej


(K³t!xxXnOsSXxx) #25

well thej i hope some 1 can help me too cuz i have the same problem :confused: i think we will have to wait
:frowning:


(evillair) #26

I got it to work; Here’s the info…


//*========--------- obj 3 ----------=========*//
//=========       forward spawn      ===========

	trigger forwardbunker_flagblue
	{
		// Some kind of UI pop-up to alert players
		wm_announce	"Allies captured the Forward Shack!"

		wm_objective_status	3 1 1
		wm_objective_status	3 0 2
		//accum 1 set 0 

	}

	trigger forwardbunker_flagred
	{
		// Some kind of UI pop-up to alert players
		wm_announce	"Axis captured the forward Shack!"

		wm_objective_status	3 1 2
		wm_objective_status	3 0 1
		accum 1 set 1 

	}
}

forwardbunker_spawns
{
	spawn
	{
	}
}

forwardbunker_wobj
{
	spawn
	{
	}
}

forwardbunker_flag
{
	spawn
	{
		accum 0 set 0	// Who has the flag: 0-Axis, 1-Allied
	}

	trigger allied_capture
	{
		accum 0 abort_if_equal 1 // do Allies own flag?

		trigger game_manager forwardbunker_flagblue

		setstate forwardbunker_spawns default
		setstate forwardbunker_wobj default

		trigger forwardbunker_flag setallies

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "battery_axis_controls_defend"
		wm_addteamvoiceannounce 0 "battery_axis_bunker_capture"

		wm_addteamvoiceannounce 1 "battery_allies_controls_destroy"

		wm_teamvoiceannounce 0 "battery_axis_bunker_lost"
		wm_teamvoiceannounce 0 "battery_axis_controls_defend"

		wm_teamvoiceannounce 1 "battery_allies_bunker_captured"
		wm_teamvoiceannounce 1 "battery_allies_controls_destroy"

		wm_removeteamvoiceannounce 0 "battery_axis_bunker_defend"

		wm_removeteamvoiceannounce 1 "battery_allies_bunker_capture"
		// *---------------------------------------------------------------------------------*
	}

	trigger setallies
	{
		accum 0 abort_if_equal 1
		accum 0 set 1

		alertentity forwardbunker_wobj
		alertentity forwardbunker_spawns

		setautospawn "Axis Main Bunker" 0
	}

	trigger axis_capture
	{
		accum 0 abort_if_equal 0 // do Axis own flag?

		trigger game_manager forwardbunker_flagred

		setstate forwardbunker_spawns default
		setstate forwardbunker_wobj default

		trigger forwardbunker_flag setaxis

		// *----------------------------------- vo ------------------------------------------*
				wm_addteamvoiceannounce 0 "battery_axis_bunker_defend"

		wm_addteamvoiceannounce 1 "battery_allies_bunker_capture"

		wm_teamvoiceannounce 0 "battery_axis_bunker_captured"

		wm_teamvoiceannounce 1 "battery_allies_bunker_lost"

		wm_removeteamvoiceannounce 0 "battery_axis_bunker_capture"

		wm_removeteamvoiceannounce 1 "battery_allies_controls_destroy"
		// *---------------------------------------------------------------------------------*
	}

	trigger setaxis
	{
		accum 0 abort_if_equal 0
		accum 0 set 0

		alertentity forwardbunker_wobj
		alertentity forwardbunker_spawns
	}
}



Here’s my bsp code with the pertaining data. (hope I didn’t miss anything)

I suggest using the entities that sock wrote and adapting it to your map and maybe just use the script I posted.


"target" "forwardbunker_spawns"
"targetname" "forwardbunker_flag"
"angle" "270"
"scriptname" "forwardbunker_flag"
"classname" "team_WOLF_checkpoint"
"origin" "-256 1024 316"
"spawnflags" "1"
"objflags" "4"
}
{
"objective" "3"
"target" "forwardbunker_wobj"
"origin" "-128 1312 520"
"classname" "info_limbo_camera"
}
{
"description" "Forward Bunker"
"origin" "-260 1024 472"
"classname" "team_WOLF_objective"
"targetname" "forwardbunker_wobj"
"scriptname" "forwardbunker_wobj"
"spawnflags" "1"
}
{
"targetname" "forwardbunker_spawns"
"spawnflags" "3"
"angle" "225"
"origin" "128 1320 352"
"classname" "team_CTF_redspawn"
"scriptname" "forwardbunker_spawns"
}
{
"angle" "225"
"classname" "team_CTF_bluespawn"
"origin" "76 1320 352"
"spawnflags" "1"
"targetname" "forwardbunker_spawns"
"scriptname" "forwardbunker_spawns"
}

What I did was used only the ents that sock mentioned and ‘borrowed’ the Battery code and adapted it to my map.


(Thej) #27

Thx alot, i will give it a try later on tonite :smiley:


(Thej) #28

Bah, i get this error now

G_Scripting:autospawn, couldn’t find target

And i copied everything u wrote down, so i dunno whats wrong now :banghead:


(evillair) #29

you need to have normal spawn points for each team + this new one.

Make sure you named the other axis spawn ‘description’ is “Axis Main Bunker” if you copied it directly.
“Allies Spawn” for the Allies.

[EDIT]

I posted the script after rearranging it and I messed up somewhere… sorry…


game_manager
{
	spawn
	{

\\your stuff here

	setautospawn "Forward Bunker"	1 
		setautospawn "Forward Bunker"	0
	}

	trigger forwardbunker_flagblue
	{
		// Some kind of UI pop-up to alert players
		wm_announce	"Allies captured the Forward Shack!"

		wm_objective_status	3 1 1
		wm_objective_status	3 0 2
		//accum 1 set 0 

	}

	trigger forwardbunker_flagred
	{
		// Some kind of UI pop-up to alert players
		wm_announce	"Axis captured the forward Shack!"

		wm_objective_status	3 1 2
		wm_objective_status	3 0 1
		accum 1 set 1 

	}
}

Delete the repeated code from my first post.
(trigger forwardbunker_flagblue to trigger forwardbunker_flagred)

My .script is all messed up from rearangin now my map won’t ‘limbo’ need to recheck everything now…this might not even be right.

This happens when you don’t sleep. :bored:


(Thej) #30

Thx for the help getting this damn flag to work properly :smiley:

well i got the flag to work, so it pops up nicely on the command map, but for some reason it wont stay up on the command map.


(ziege) #31

I spent about 5 hours messing with this last night, finaly got it working :slight_smile:

Drakirs script I couldn’t get to work, got the same problems as the other posters reported, but I’m sure it’s something we’re doing wrong since Drakirs Rhine map works great.

So I followed Socks post very carefully to the letter, and even before I put in any script, the forward spawn was working perfectly (only it didn’t show up on the command map). I opened the oasis.script and copied lines 159-243 into my own maps script. I also copied 66-67. This gave an error “G_Scripting Error: Couldn’t find setautospawn target” even though I had the Old City description as it should be, so I removed lines 66-67 altogether and now it seems to work perfectly.

I want to put together a quick tutorial for doing this, so my question is do I need those lines (66-67) in the game_manager part of my script? I already have normal default spawns away from the flagpole, and it seems to work fine. Should I just leave this part out of my tutorial?

(BTW the flag is only supposed to show on the command map for the spectator and the team who owns it, right?)


(Thej) #32

Well in oasis both teams can see the flag, and u see the flag switch from one team to another, in my map, u just see the flag pop up for the team that takes it


(ziege) #33

I just tested Oasis, it works exactly the same as in does in my map. The flag on the command map is only visible to the team that owns it, or the spectator.


(sock) #34

The “setautospawn” command needs the text to be exactly like the value in the entity. The lines 66-67 in the oasis script are used for the setautospawn feature only. The forward spawn will work fine without them, just you will need to keep selecting the spawn point everytime from the limbo menu. (Like the bug in the map “battery”, the forward spawn bunker)

In order for the capture spawn point to appear on the command map it has to have the “team_WOLF_objective” entity switched around each time the flag is touched by either team. This is essentially what the script is used for, switching the state of the “team_WOLF_objective” entity.

The spawnpoint should only appear for the relevant team that owns it and spectators. That is why the script is switching the “team_WOLF_objective”.

Sock
:moo:


(ziege) #35

OK thanks a lot Sock :slight_smile:


(Thej) #36

Yeh, thx for clearing things up :smiley:


(Erik-Ftn) #37

Hi.

I know what one of the problems was in this thread. It’s the old wait 200 spawn thing.

Guys if you add a wait 200 (or more) before your scriptlines, the enteties have spawned and the script will find it.

cheers

Erik


(Shad0w) #38

but, how do you do for begin with the axis flag, for axis directly spawn like the oasis map?, i searched but i didn’t found anything… :???:


(Shad0w) #39

anyone got the answer?


(sock) #40

but, how do you do for begin with the axis flag, for axis directly spawn like the oasis map?, i searched but i didn’t found anything…

Who owns the spawn point first is done via the entities. To change the forward spawn point to be axis first, look at the follwing entities:

“team_WOLF_objective”. Change the spawnflag settings to “default_axis”. (Big yellow entity)
“team_CTF_redspawn” . Change the spawnflag settings to “startactive” and “invulnerable”. (Axis spawn)
“team_CTF_bluespawn”. Change the spawnflag settings to “invulnerable” only. (Allies spawn)

Make sure your script understands that the forward spawn flag is axis otherwise it will produce wierd results in game.

Sock
:moo: