Is it possible to run multiple team_ctf_blue/redflag?


(Ifurita) #1

I’m trying to make a map with grab & return objectives in 2 different spots (radar components and gold). I have 2 trigger_flagonly_multiples, one for each objective. However, the t_f_m gets triggered whenever any objective carrier passes thru the TOI. So, if I’m carrying the box of gold but run thru the radar trigger, it just recognizes that it’s a valid blue flag and runs the radar_script.

I was thinking of toggling the accum values for each so that the TOI would know which objective was being secured, but in the event that both objectives were in play (being carried), I would run into the same problem.

Anyone have suggestions?

Thanks


(Ifurita) #2

nm, got it to work. Still have most of my hair too


(chavo_one) #3

So what’d you do to get it to work? I thought about it for a few minutes when I read your initial post and nothing came to me, so I would be interested in hearing. :smiley:


(Ifurita) #4

As it turns out, it’s a pretty simple script, consisting of 3 parts:

  1. Flag states and actions for objective 1
  2. Flag states and actions for objective 2
  3. Blanket action whenever any flag is returned

The main thing I changed was using only one trigger_flagonly_multiples at the truck which checked for game win/not win. The scripts giving instructions for the flag states were moved to the team_ctf_red/blue flag entities.


//Axis Objectives

//Radar
	allied_radar //enter this as the scriptname value for the team_CTF_red/blueflag entity
	{
		spawn
		{
			accum 4 set 0 // status of Allied radar parts (Axis objective)
			setstate allied_radar_captured invisible
		}

		trigger stolen
		{
			wm_announce 0 "Return the Allied radar set to the getaway truck"
			wm_announce 1 "The Axis have stolen the Allied radar set"
		}

		trigger returned
		{
			wm_announce 0 "The Allies have retrieved the radar set"
			wm_announce 1 "Radar set returned!  Protect the radar set"
		}

		trigger captured
		{
			wm_announce "The Axis have secured the Allied radar components"
			setstate allied_radar_red invisible
			setstate allied_radar_captured default
		}
	}


//Gold
	allied_gold
	{
		spawn
		{
			accum 6 set 0 // gold status
			setstate allied_gold_captured invisible 
		}

		trigger stolen
		{
			wm_announce 0 "Return the Allied gold to the getaway truck"
			wm_announce 1 "The Axis have stolen the Allied gold"
		}

		trigger returned
		{
			wm_announce 0 "The Allies have retrieved the gold"
			wm_announce 1 "Gold returned!  Protect the gold"
		}

		trigger captured
		{
			wm_announce "The Axis have secured the Allied gold"
			setstate allied_gold_red invisible
			setstate allied_gold_captured default
		}
	}

	allied_objectives //enter this as the scriptname value for the single trigger_flagonly_multiples entity 
	{	
	death
		{
			trigger game_manager obj1
		}
	}