Tutorial    mission script

Work in Progress

       general overview       General overview

The .ent

The .items

The .script


The mission part is a bit special because we use more the keyboard than the map editor but don't be affraid, it's not so hard if u look CAREFULLY what u do. If u look into a .pk3 you'll find a directory called "mission" with some other folders&files inside. this is what we need. i imagine u have allready looked inside.

Because the mission is an addition to Q3, we have to add the "entites" and "items" manualy. i mean we are not going to add this entites with GTK or any map editor, but with a .TXT. Take to respect the syntax/structure of the files and don't save them as txt. i suggest u to study how the other script are done.

I give u a part of the list of commands/varaibles used in the files for the mission:

----game variable----

mapdescription " # " --This is the map description in the main menu

number_of_objectives #  -- the number of  objectives the map has. 0-6

set_objective_status # "#"  -- the first # is the objective number and the second is the status indicator on HUD 0=none 1=red 2=blue

objective_red_desc # " # " -- the first # is the objective number and the second is the description in the main menu.

objective_blue_desc # "#" --the same but for the blue

objective_image # "#" -- the first # is the objective number and the second is the path of the picture

set_red_inventory --set the inventory of the red 0=none 1=bomb    2=defuse pliers

set_blue_inventory  -- the same for the blue

red_respawntime -- set the respawn time of the red

blue_respawntime --the same for the blue

set_mission_time -- set the mission time

set_ mission_rounds #  --set the number of rounds

set_mission_caps # -- set the number of capture limit

set_mission_frag # -- set the fraglimit

set_mission_lives # -- set the number of lives

setwinner # -- set the winner 1=red 2=blue

----goals and items----

"scriptname" --put the name of the goal/items. in the script page the name for the suitcase is "SuitCase"

spawn -- initialize the goal

details --things that must be done before the goal will work

passedetails --what to do if the details are done

faildetails --what to do if the details arn't done

touch -- what to do if the goal is touched and details are done

death -- what to do if the goal is destroyed

relay -- similar to trigger_relay entity. use it when details are done

----pickup items----

pickup -- what to do when items is picked up

drop -- what to do if the items is droped

respawn -- what to do if the items is respawned

---- spawn ----

goalnumber # -- #is the goalnumber (is it the first?)

goal_state # -- 1= active 2= idle/waiting 3=hidden/waiting

goal_activation # 1=by touch 2=by C4 damage 4=when Ap details arn't done 8= by damage 16=by grenade damage

goal_result # -- what to do when it's activeted 4=end level

team # -- 1=red 2=blue

istrigger # -- 1=non solid 2=non solid and invisible

----special for pickup items----

goal_activation # -- 4= when players dies, the item fall on floor 8=return instantly if player die 64=only pickup if Ap details arn't done

----Message commands----

broadcast "#" --to all players

broadcastRed "#" --red team only

broadcastBlue "#" -- blue team only

broadcastAP "#" -- activating player

broadcastAPteam "#" -- activating player's team


if_AP_isteam # --if the activating player is red or blue

if_goal_ishidden # -- # is the goalnumber

if_goal_isidle # -- # is the goalnumber

if_goal_isactive # -- # is the goalnumber

if_goal_destroyed # -- if goal # doesn't exist

---- general ----

activate_goal # -- # is the goalnumber

deactivate_goal # --set goal to idle # is the goalnumber

restore_goal # -- unhide a goal # is the goalnumber

hide_goal # -- hide a goal # is the goalnumber

need_item # --item u must have  # is the goalnumber

set_objective_status # "#" -- set the HUD icon status # is the goalnumber "0=none 1=red 2=blue"

setwinner # -- set the winner 0=none 1=red 2=blue (for level that have a starting winner, if one team failed)