Spawn Point


(Ba$tard) #1

Hi everyone
I’m desperate cause I worked really hard on my forward spawnpoint but its still not working. Everytime an allied guy want to capture the flag there stands:
G_scripting: setautospawn, couldn’t find target

I just started making maps but and I really dont know what to do.
Can someone help me out plz?


(murka) #2

check that there are no typos, and that there is a spawn with such a name.


(-SSF-Sage) #3

Setautospawn’s name is the same as the value of the description key of the team_wolf_objective. So setautospawn “TWO’ description”. :slight_smile:


(Ba$tard) #4

srry it sounds stupid but I still dont get what I need to change :frowning:


(fliquid) #5

Hello, I am his clanleader. :slight_smile:
He just started scripting, it’s like reading a chinese book. :smiley:
Anyway you have to be a bit more detailed in your sollution please.


(Ba$tard) #6

yes plz :smiley: im a scripting noob


(fliquid) #7

I got it working mate!


(Ba$tard) #8

Now its all working but its still invisible at the command map so u cant spawn there :S
thanks fliq for your hard work btw :wink:


(fliquid) #9

You’re welcome! :roll:


(Ba$tard) #10

this is the script

// =================================================
forward_flag
{
spawn

{

accum 0 set 2				// Who owns flag: 0-Axis, 1-Allied, 2-Nobody

}

trigger axis_capture			// Touched by an Axis player

{

accum 0 abort_if_equal 0		// do Axis own flag?

accum 0 trigger_if_equal 1 forward_flag axis_reclaim		// Reclaimed from Allies

accum 0 set 0 		// Axis own the flag

wm_announce "Axis have captured the Forward Flag!"

setstate forward_wobj default

}

trigger axis_reclaim

{

alertentity forward_wobj		// Switch command map marker

}

trigger allied_capture			// Touched by an allied player

{

accum 0 abort_if_equal 1		// do Allies own flag?

accum 0 set 1				// Allied own the flag

wm_announce "Allies have captured the Forward Flag!"

setstate forward_wobj default

alertentity forward_wobj		// Switch command map marker

}
}


(fliquid) #11

This is the entire script, now we want the second spawn to become permanent allies spawn when the partycafedoor is blown.
Does anyone know how to do that?

game_manager
{

	spawn
	{
		wm_axis_respawntime	10
		wm_allied_respawntime	10
		wm_set_round_timelimit	30

		// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team	0

		// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
		wm_setwinner 0	

		wait 500

		setstate forward_wobj default

		setautospawn "Forward Flag" 0
		setautospawn "Forward Flag" 1
	}
}


// =================================================
Partycafe_gate
{
	spawn
	{
		wait 300
		constructible_class 3
	}

	death
	{
		alertentity Partycafe_gate_bits
		trigger Partycafe_gate_toi remove

		wm_announce "The Allies have destroyed the Partycafe Gate!!!!"
	}
}

Partycafe_gate_toi
{
	trigger remove
	{
		remove
	}
}


// =================================================
objective_gate
{
	spawn
	{
		wait 300
		constructible_class 3
	}

	death
	{
		alertentity objective_gate_bits
		trigger objective_gate_toi remove

		wm_announce "The Allies have destroyed the Objective Gate!"
	}
}

objective_gate_toi
{
	trigger remove
	{
		remove
	}
}


// =================================================
forward_flag
{
spawn

{

	accum 0 set 2				// Who owns flag: 0-Axis, 1-Allied, 2-Nobody

}

	trigger axis_capture			// Touched by an Axis player

{

	accum 0 abort_if_equal 0		// do Axis own flag?

	accum 0 trigger_if_equal 1 forward_flag axis_reclaim		// Reclaimed from Allies

	accum 0 set 0 		// Axis own the flag

	wm_announce "Axis have captured the Forward Flag!"

	setstate forward_wobj default

}

	trigger axis_reclaim

{

	alertentity forward_wobj		// Switch command map marker

}

	trigger allied_capture			// Touched by an allied player

{

	accum 0 abort_if_equal 1		// do Allies own flag?

	accum 0 set 1				// Allied own the flag

	wm_announce "Allies have captured the Forward Flag!"

	setstate forward_wobj default

	alertentity forward_wobj		// Switch command map marker

} 	
}


// =================================================
escape_route1
{
	spawn
{
	wait 200
	constructible_class 3
	constructible_constructxpbonus 1
	constructible_destructxpbonus 1
	setstate escape_materials invisible
}
	built final
	{
	setstate escape_route1 default
	setstate escape_materials invisible
}
decayed final
{
	setstate escape_materials default
	setstate escape_route1 invisible
}
	death
{
	wm_announce "The escape route has been destroyed!"
	setstate escape_materials default
	}
}

(murka) #12

you might want to look at the oasis script…
and open the oasis.bsp file in notepad, keys and their values should be near the end, all the other pieces are with strange symbols.


(fliquid) #13

Okay I modified the entire script and now it ends with an error "unexpected } line 209

Line 209 is the last line.

game_manager
{
	spawn
	{
		accum 1 set 0		//State of objective number one

		//Game rules
		wm_axis_respawntime	10
		wm_allied_respawntime	10
		wm_number_of_objectives 1
		wm_set_round_timelimit	30

		// Objectives
		// 1: Primary1 : Capture forward spawn point
		// 2: Primary2 : Destroy the PartyCafe Gate
		// 3: Primary3 : Get the documents
		// 4: Secondairy 1 : Build escape route
		
		// Current main objectives for each team (0=Axis, 1=Allies)
		wm_set_main_objective		1	0
		wm_set_main_objective		1	1

		// Objective overview status indicators
		//wm_objective_status <objective> <team (0=Axis, 1=Allies)> <status (0=neutral 1=complete 2=failed)>
		wm_objective_status 1 1 0
		wm_objective_status 1 0 0
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0
		wm_objective_status 3 1 0
		wm_objective_status 3 0 0

		// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team	0

		// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
		wm_setwinner 0	

		// Set autospawn markers <team (0 = axis, 1 = allies)> <message key of marker>
		// Spawns on partytime:
		// Axis PartyCafe
		// Allied Beach
		// Forward Flag
		wait 150

		setautospawn "forward_flag"			1
		setautospawn "forward_flag"			0

		wait 350
	}
}


// =================================================
Partycafe_gate
{
	spawn
	{
		wait 300
		constructible_class 3
	}

	death
	{
		alertentity Partycafe_gate_bits
		trigger Partycafe_gate_toi remove

		wm_announce "The Allies have destroyed the Partycafe Gate!!!!"
	}
}

Partycafe_gate_toi
{
	trigger remove
	{
		remove
	}
}

// =================================================
forward_flag
{
	spawn
	{
		accum 0 set 2	// Who owns flag: 0-Axis, 1-Allied, 2-Nobody
	}

	trigger axis_capture	// Touched by an Axis player
	{
		accum 0 abort_if_equal 0		// do Axis own flag?

		accum 0 trigger_if_equal 1 forward_flag axis_reclaim		// Reclaimed from Allies

		accum 0 set 0 		// Axis own the flag
		wm_announce "Axis have captured the Forward Flag!"

		wm_objective_status 		1 0 1
		wm_objective_status 		1 1 2

		setstate forward_flag_wobj
	}

	trigger allied_capture	// Touched by an allied player
	{
	
		accum 0 abort_if_equal 1	// do Allies own flag?

		accum 0 set 1			// Allied own the flag
		wm_announce "Allies have captured the Forward Flag!"

		wm_objective_status 		1 0 2
		wm_objective_status 		1 1 1

		alertentity forward_flag_wobj		// Switch command map marker
	}
	
	trigger check_obj
	{
		accum 0 abort_if_equal 1 // Do Allied own the flag?

		wm_objective_status 		1 0 2
		wm_objective_status 		1 1 1
	}

	trigger force_allied
	{
		accum 0 abort_if_equal 1 // Do Allied own the flag?

		alertentity forward_flag_wobj
		alertentity forward_flag
	}

	trigger kill
	{
		remove
	}

// =================================================
objective_gate
{
	spawn
	{
		wait 200

		constructible_class 3
	}
	
	death
	{
		trigger forward_flag force_allied // Switch forward spawn to Allied ONLY

		trigger forward_flag check_obj

		trigger forward_flag kill

		wm_announce "The Allies have destroyed the Objective Gate!"

		wm_objective_status 		2 0 2
		wm_objective_status 		2 1 1

		wm_set_main_objective	1 0
		wm_set_main_objective	1 1
	}
}

// =================================================
escape_route1
{
	spawn
	{
		wait 200

		constructible_class 3

		trigger escape_route1 setup
	}
	
	trigger setup
	{
		setstate escape_materials default
		setstate escape_route1 invisible
	}
	
	builtstart final
	{
		setstate materials default
		setstate escape_route1 underconstruction
	}
	
	built final
	{
		setstate escape_materials invisible
		setstate escape_route1 default

		wm_announce "The escape route has been constructed!"

		wm_objective_status 		4 0 2
		wm_objective_status 		4 1 1
	}
	
	death
	{
		setstate escape_materials default
		setstate escape_route1 invisible

		wm_announce "The escape route has been destroyed!"
	
		wm_objective_status		4 0 1
		wm_objective_status		4 1 2
	}
}

(murka) #14

the debug program wont direct you to the correct line, because he cant understand what you mean, you must have one } over somewhere…
but i have yet to find it, maybe i have missed it.

found it, a } is missing.

   trigger kill
   {
      remove
   }
}//THIS WAS MISSING
// =================================================
objective_gate 

(Ba$tard) #15

Now my map is almost finished but now I have another prob.
There stands an error sv_setbrushmodels NULL
I know what it means but I cant find the fault in the game :S


(murka) #16

find all brushed with origin textures, i know it was possible somehow, and invert the selection, hide the selection, thus leaving you all origin brushes, now search for one that isnt an entity.


(Ba$tard) #17

I dont get it I have deleted all the origin textures but still the same prob…


(fliquid) #18

I think you did something differend then what he said… :shock:


(murka) #19

check that you dont have like some portal textures as entities or sth…


(fliquid) #20

Unfortunately he gave up, it was a great map that will never see its ending… :frowning: