objective


(blizzard) #1

does somebody have a tutorial about how to make a objective, which the allies can steal and bring it somewhere else to win the game. like a goldcrate or something.


(nUllSkillZ) #2

Ifurita has made a nice tutorial.
But unfortunately I can’t find it anymore on his site:
http://4newbies.planetwolfenstein.gamespy.com/tutorials.php


(FireFly) #3

It’s still there :slight_smile:
http://4newbies.planetwolfenstein.gamespy.com/objective.php


(nUllSkillZ) #4

Thanks for the link.

Hmm, shouldn’t the script start with:


trigger allied_gold
{
...

instead of “//Gold allied_gold {” (haven’t had a look at the prefab though).


(blizzard) #5

hello i tryed the tutorial but i can’t start my map because it gave this error
G_script_scriptparse error line 176 “}” expected end of script found

the tutorial has got a truck but i don’t want a truck so i delete the truck
then i placed the coldcrate in my map and the script part in my script

this is my script now

Gold allied_gold
      {
      spawn
      {
      wait 200
      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"
      setstate allied_gold_cm_marker invisible
      }

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

      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
      }
      }

maybe there is a other tutorial or something cuz it’s hard too understand.
i don’t want a truck, i just want something like frostbite and adlernest
maybe a radarpart a document or something else


(eiM) #6

blizzard I advise you to take a look at the map Radar. There you have 2 objective runs which dont include any truck movement or whatsoever. The mapsources have been released a year ago so its no problem to load the map in radiant. By looking at the entity keys of the objectives (radarparts) you will find the corresponding script-block fast.


(blizzard) #7

ok thx i will try
do you stay available plz? :slight_smile:


(stealth6) #8

I can agree that the tutorial is rather confusing, and the script ???
Anyway this is the script from adlernest as an example (hope he doesn’t mind :s
I already took out all of the other stuff this is just the documents related part, so now you just need to change it to gold.


game_manager
{
	spawn
	{
		// Set scenario information
		wm_axis_respawntime 30
		wm_allied_respawntime 20
		wm_number_of_objectives 2
		wm_set_round_timelimit 15

		// 0  is axis
		wm_set_defending_team 1
		wm_setwinner 1

		//Take docs
		wm_objective_status 1 1 0
		wm_objective_status 1 0 0
		//Cap docs
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0

		//main opjective is to cap docs
		wm_set_main_objective 2 1
		wm_set_main_objective 2 0

		// Cap docs
		accum 1 set 0
		//Take docs
		accum 2 set 0
	}

	trigger cap_docs
	{
		//cap docs: true
		wm_objective_status 2 1 1
		wm_objective_status 2 0 2
		//cap docs: true
		accum 1 set 1
		wm_announce "Allied team has transmitted the documents!"
		trigger game_manager checkgame
	}

	trigger axis_object_stolen
	{
		//wm_announce	"Allies have stolen the documents!"
		wm_objective_status 1 1 1
		accum 2 set 1
	}

	trigger axis_object_returned
	{
		//wm_announce	"The documents have been returned!"
		wm_objective_status 1 1 0
		accum 2 set 0
		accum 1 set 0
	}

	trigger checkgame
	{
		accum 1 abort_if_not_equal 1
		wm_setwinner 1
		wait 100
		wm_endround
	}
}

transmitter_obj
{
	spawn
	{
	}
	death
	{
		trigger game_manager cap_docs
	}
}

documents
{
    spawn
    {
	    wait 200
    }
    trigger stolen 
    {
    	//when the objective is taken 
    	// Hide command map marker of docs at table
    	setstate documents_CMM invisible 
	}
	trigger dropped
	{
		//when the player carrying the objective is killed 
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 1 "allies_hq_objective_lost"
		// *---------------------------------------------------------------------------------*
	}
	trigger returned
	{
		//when defending team touches the dropped objective
		// Show command map marker of docs at table
		setstate documents_CMM default
	} 
	trigger captured
	{
		//when the objective is delivered to its deliverypoint 
		
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_objective_lost"
		wm_teamvoiceannounce 1 "allies_hq_objective_captured"
		// *---------------------------------------------------------------------------------*
	}
}


(blizzard) #9

you all know of this community, i’m totally noob in mapping but i’ll keep it up so thx for al help and i will try the advise you give. it’s for 100% sure that you can expect a reply on your advise cuz i don’t understand it in 1 explain. some people know cuz i come here some times for some advise. and yee my english is a mess. i hope you understand me.


(blizzard) #10

i tryed two scripts and i’m a little closer, but it’s still complicated
while playing in my map it’s with these scripts the same look:
i have the radar parts right there but i can’t pick them up and the drop off place isn’t a red radarpart but just like the pick off radar part.

game_manager
{
	spawn
	{
		wm_axis_respawntime	30
		wm_allied_respawntime	20
		wm_set_round_timelimit	15

		// 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

		setautospawn "C" 0
		setautospawn "A" 1

		setstate allied_wobj2 invisible

	}

	

	trigger stolen
	{
		wm_announce 0 "Return the Allied Radarparts to the Computer"
		wm_announce 1 "The Axis have stolen the Allied Radarparts"
		setstate allied_gold_cm_marker invisible
	}

	trigger returned
	{
		wm_announce 0 "The Allies have retrieved the Radarparts"
		wm_announce 1 "Radarparts returned! Protect the Radarparts"
		setstate allied_gold_cm_marker default
	}

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


gate1
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		trigger gate1_toi remove

		wm_announce "The Allies have destroyed the first gate!"

		setstate axis_wobj1 invisible

		setstate allied_wobj2 default

		alertentity C
		alertentity A
		alertentity B
		alertentity D


	}
}

gate1_toi
{
	trigger remove
	{
		remove
	}
}



alliedconstruct_1
{
	spawn
	{
		wait 50
		trigger self setup
		constructible_class	2	// 2=Satchel 3=Dyna
	}

	trigger setup
	{
		setstate alliedconstruct_1_materials default	// Crate Models
		setstate alliedconstruct_1_clip default		// Clip brushes
		setstate alliedconstruct_1_flag default
	}

	built final
	{
		setstate alliedconstruct_1_materials invisible	// Crate Models
		setstate alliedconstruct_1_clip invisible	// Clip brushes
		setstate alliedconstruct_1_flag invisible

		wm_announce "Allied Team have built the second gate!"
	}

	decayed final
	{
		trigger self setup
	}

	death
	{
		trigger self setup
		wm_announce "Axis have destroyed the second gate!" 
	}
}



alliedconstruct_2
{
	spawn
	{
		wait 50
		trigger self setup
		constructible_class	2	// 2=Satchel 3=Dyna
	}

	trigger setup
	{
		setstate alliedconstruct_2_materials default	// Crate Models
		setstate alliedconstruct_2_clip default		// Clip brushes
		setstate alliedconstruct_2_flag default
	}

	built final
	{
		setstate alliedconstruct_2_materials invisible	// Crate Models
		setstate alliedconstruct_2_clip invisible	// Clip brushes
		setstate alliedconstruct_2_flag invisible

		wm_announce "Allied Team have built the third gate!"
	}

	decayed final
	{
		trigger self setup
	}

	death
	{
		trigger self setup
		wm_announce "Axis have destroyed the third gate!" 
	}
}

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

radarpart
{
    spawn
    {
	    wait 200
    }
    trigger stolen 
    {
    	//when the objective is taken 
    	// Hide command map marker of docs at table
    	setstate allied_gold_cm_marker invisible 
	}
	trigger dropped
	{
		//when the player carrying the objective is killed 
		// *----------------------------------- vo ------------------------------------------*
		// *---------------------------------------------------------------------------------*
	}
	trigger returned
	{
		//when defending team touches the dropped objective
		// Show command map marker of docs at table
		setstate allied_gold_cm_marker default
	} 
	trigger captured
	{
		//when the objective is delivered to its deliverypoint 
		
		// *----------------------------------- vo ------------------------------------------*

		// *---------------------------------------------------------------------------------*
	}
}
game_manager
{
	spawn
	{
		wm_axis_respawntime	30
		wm_allied_respawntime	20
		wm_set_round_timelimit	15

		// 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

		setautospawn "C" 0
		setautospawn "A" 1

		setstate allied_wobj2 invisible

	}

	

	trigger stolen
	{
		wm_announce 0 "Return the Allied Radarparts to the Computer"
		wm_announce 1 "The Axis have stolen the Allied Radarparts"
		setstate allied_gold_cm_marker invisible
	}

	trigger returned
	{
		wm_announce 0 "The Allies have retrieved the Radarparts"
		wm_announce 1 "Radarparts returned! Protect the Radarparts"
		setstate allied_gold_cm_marker default
	}

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


gate1
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		trigger gate1_toi remove

		wm_announce "The Allies have destroyed the first gate!"

		setstate axis_wobj1 invisible

		setstate allied_wobj2 default

		alertentity C
		alertentity A
		alertentity B
		alertentity D


	}
}

gate1_toi
{
	trigger remove
	{
		remove
	}
}



alliedconstruct_1
{
	spawn
	{
		wait 50
		trigger self setup
		constructible_class	2	// 2=Satchel 3=Dyna
	}

	trigger setup
	{
		setstate alliedconstruct_1_materials default	// Crate Models
		setstate alliedconstruct_1_clip default		// Clip brushes
		setstate alliedconstruct_1_flag default
	}

	built final
	{
		setstate alliedconstruct_1_materials invisible	// Crate Models
		setstate alliedconstruct_1_clip invisible	// Clip brushes
		setstate alliedconstruct_1_flag invisible

		wm_announce "Allied Team have built the second gate!"
	}

	decayed final
	{
		trigger self setup
	}

	death
	{
		trigger self setup
		wm_announce "Axis have destroyed the second gate!" 
	}
}



alliedconstruct_2
{
	spawn
	{
		wait 50
		trigger self setup
		constructible_class	2	// 2=Satchel 3=Dyna
	}

	trigger setup
	{
		setstate alliedconstruct_2_materials default	// Crate Models
		setstate alliedconstruct_2_clip default		// Clip brushes
		setstate alliedconstruct_2_flag default
	}

	built final
	{
		setstate alliedconstruct_2_materials invisible	// Crate Models
		setstate alliedconstruct_2_clip invisible	// Clip brushes
		setstate alliedconstruct_2_flag invisible

		wm_announce "Allied Team have built the third gate!"
	}

	decayed final
	{
		trigger self setup
	}

	death
	{
		trigger self setup
		wm_announce "Axis have destroyed the third gate!" 
	}
}

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

so these 2 scripts are the same looking in the map.
how can i fixed it


(eiM) #11

learn to understand what the lines do. There are plenty of scripting tutorials in the sticky threads. You wont benefit much from getting snippets all the time. This is a very simple scriptwork which you should be able to do yourself as soon as you read some of the tutorials.


(blizzard) #12

i know what the lines mean but i mostly don’t know where to put each line.


(blizzard) #13

where can i find the .map file of radar.
i can’t find it anywhere does somebody have a link.


(blizzard) #14

where can i find the .map file of adlernest or radar?


(Berzerkr) #15

Radar can be found here:
http://www.splashdamage.com/content/wolfenstein-enemy-territory-map-source-files-released


(Qualmi) #16

a short explanation, but this will only give you a momentary success and no real understanding. you have to read some tutorials about scripting in general and as mine seem to be shit i dont propose it to you…

you need 2 things. a place to capture and a place to steal.

place to steal = team_ctf_redflag or team_ctf_blueflag
place to capture = trigger_flagonly_multiple

to set up the team_ctf_flags you have to insert them, and set

key: scriptname
value: kjahsfdkjhsaabslkjaslkdjsaledjiowaedjlskadjlksajddgfdgalkalsdjlskadjlsajldksjalkdjalkdjlsajdlajldkjwofjlakjslsjaldjasldjalsdjlajwlrjalksjfljaslfdjalskdjlösakdjlskadjlsajdlsajdlskajd

then choose a model key for it f.i.

key: model
value: models/mapobjects/blitz_sd/blitzbody.md3

to set up the trigger_flag_only-entity you must make a brush with the texture from common/trigger and transfer it into the trigger_flagonly_multiple-entity. no scriptnames, no nothing. maybe set the spawnflag to a team if you want, but it can work without too. and of course you must and will apply this to your needs.

the script:


game_manager
{

    spawn
    {
    }
}

kjahsfdkjhsaabslkjaslkdjsaledjiowaedjlskadjlksajddgfdgalkalsdjlskadjlsajldksjalkdjalkdjlsajdlajldkjwofjlakjslsjaldjasldjalsdjlajwlrjalksjfljaslfdjalskdjlösakdjlskadjlsajdlsajdlskajd
{

        spawn
        {

        }

        trigger stolen
        {
				
        }

	trigger dropped
	{

	}

	trigger returned
	{

	}

	trigger captured 
	{

        }
}


there is also another way to do it, with the scriptname on the flag_only_multiple for example, but this way it works perfectly. steal sth and bring it to some place.


(blizzard) #17

ok i came back to thank you all
because it’s working!
the one who made adlernest the one who made sp_delivery everybody of splashdamage
my friend viktwaar and a couple of tutorials helps me with this.
one of the tutorials is this who help me a lot.
http://www.wolfensteinx.com/surface/tutorials.html
it looks easy for people who knows how to do it, but it makes me quiet insane :wink:
i know even for the pro mapping guys is this familiar in the past and maybe still


(Diego) #18

The spyjuice tutorials were great for this. His tutorials cover a lot of objectives. But I don’t think they are available anymore.


(Diego) #19

Ah. I found the spyjuice tutorials. They have been archived at this website. These helped me out a lot so you should check them out.

http://www.ericrbarth.com/www/?page_id=13


(nUllSkillZ) #20

Ifurita’s scripting tutorial:
http://4newbies.planetwolfenstein.gamespy.com/Map_Scripting_4_Newbies.pdf

You will need a software that can display PDF files.