Skip Navigation
Resources
Group Information

Documents

1. Make some basic room and place an info_player_start. I made two blocks to put the objective on one of them and one to bring it there but u needn't build them too...





2. Right click and choose the team_ctf_redflag. Now select the team_ctf_redflag and press 'N' to get the entity window. Fill in the values just like I did. The message key tells the game what to display when u take the objective in this case it's you have taken "the documents"! the score tells the game how many points it should give you when taking the objective. Instead of entering the model-key and value by hand you can click on model and choose the one you want in this case it's models/multiplayer/secretdocs/secretdocs.md3 which are the normal secret documents but you can take any model you want, just get a flatbed and put in in your pocket ;o)






3. Place a brush with trigger texture (you find it in the common-textures set) at the second block. with the brush still selected right click and choose trigger > flagonly then press 'N. in the entities window click on red flag and enter the values I entered. red_flag means it only can be taken by allied, blue for axis of course.


4. Place a script_multiplayer entity in your map, enter the key 'scriptname' and the value 'game_manager'






5. Now we come to scripting. Here is the most simple script I could make you can copy and paste it or just download it together with the tutorial and the images at the end of the tutorial. I will not explain every script-line as there is the scripts tutorial available which explains all this already.



//Map: objective_documents_tutorial
//created by: The Muffinman

game_manager
{
spawn
{
// Set scenario information

wm_mapdescription "get the secret documents and transmit them!"

wm_axis_respawntime 15
wm_allied_respawntime 15
wm_number_of_objectives 2
wm_set_round_timelimit 15


//we have 2 objectives, taking the documents and transmitting them:
wm_set_objective_status 1 0
wm_set_objective_status 2 0


wm_set_defending_team 0
wm_setwinner 0

accum 1 set 0
accum 2 set 0
}


trigger objective1
{
wm_set_objective_status 2 1
accum 2 set 1
wm_announce "Allied team has transmitted the documents!"
trigger game_manager checkgame
}

trigger axis_object_stolen
{
wm_set_objective_status 1 1
}

trigger axis_object_returned
{
wm_set_objective_status 1 0
}


trigger checkgame
{
accum 2 abort_if_not_equal 1
wm_setwinner 1
wait 1500
wm_endround
}
}


transmitter_obj
{
spawn
{
}
death
{
trigger game_manager objective1
}
}



Dont forget to save it under the same name as the map which is in my case 'objective_documents_tutorial' with a .script at the end. Place both files in your main/maps folder, compile and run your map. Thats it!



Problems, Comments, Queries > Forum

Tutorial by Muffinman
Surface mini-logo Surface mini-logo