Page 1 of 1

Compass Objective

Posted: Sat Jan 29, 2005 4:26 pm
by MPowell1944
You know how in SP, the objectives showed on the compass. Well, I am running a FreezeTag-Demolition server and want the objectives to show up for each team on their compass. They dont now and players have hard times finding them. How would I attach an objective to a compass?

urc

Posted: Sun Jan 30, 2005 1:08 am
by tltrude
The compass is probably controled by a .urc file in the ui folder of pak0.

Posted: Sun Jan 30, 2005 1:19 am
by Grassy
The standard way is like this for spearhead, think aa is the same.

addobjective 1 1 "" $bomb1.origin
setcurrentobjective 1


for a new compass setting after the previous obj has been met, change the addobjective line to the new objective.

addobjective 2 1 "" $bomb2.origin
setcurrentobjective 2


classes info;

addobjective( Integer objective_number, Integer status, [ String text ], [ Vector location ] )
Adds/Changes an Objective

setcurrentobjective( Integer objective_number )
Sets the specified objective as the current objective


Hope this helps,
Grassy

Posted: Sun Jan 30, 2005 4:59 am
by MPowell1944
I managed to set the objective. It even stated that a new objective had been added, but it didnt point to it on my compass.

Posted: Sun Jan 30, 2005 6:40 am
by Grassy
Hmm thats odd,
Works fine here on a map I have that has random obj locations.
Are you playing in gametype 4 Obj mode?

Posted: Sun Jan 30, 2005 3:53 pm
by Green Beret
i have same prob powell,but im running it in TDM.
im guessing it has to be OBJ...Gotcha :wink:

Posted: Mon Jan 31, 2005 4:36 am
by small_sumo
This is interesting, all my stuff is obj.

Posted: Mon Jan 31, 2005 1:37 pm
by MPowell1944
Actually, it is a Round-Based gametype.

Posted: Mon Jan 31, 2005 7:50 pm
by lizardkid
i belive compass obj ball ballasts are hardcoded in MP to point to the nearest friendly player. nobody uses this but it's excellent for coordination.

i don't know if forcing a change would crash it or no.

Posted: Mon Jan 31, 2005 9:19 pm
by Green Beret
mine says objective added,and objective completed,but the level dont end,or the compass doesnt point to the objective :cry:

Posted: Mon Jan 31, 2005 11:32 pm
by Master-Of-Fungus-Foo-D
Shoulodnt the $whatever.origin thing be a script origin? im just guessing.. and what are the two numbers after ''addobjective'' for?

Posted: Tue Feb 01, 2005 12:15 pm
by Grassy
addobjective 1 1 "" $bomb1.origin
|..................|..|..|..|__vector location / can use a bomb script object or script origin.
|..................|..|..|__text string "Find the bomb and blow it :)"
|..................|..|__objective state 1=current/active 0=not current (i think)
|..................|__objective number
|___add a new objective

Here is a modified section from the bombthinker.scr I did for a map with random bomb locations.

Code: Select all

//------------------------
// Created a Random Objective Mode
ObjectiveMode local.pos:
//------------------------
   if ( level.rand_obj != 1 )
   local.pos = ( -1346.00 -907.00 353.00 )

		local.bomborigin = local.pos
		level.defusing_team = "axis" // allies
		level.planting_team = "allies"  // axis
		level.bombs_to_plant = 1
		level.bomb_damage = 600
		level.bomb_explosion_radius = 1024
		level.targets_to_destroy = 1
		level.bomb_defuse_time = 60 //tenths of a second
		level.bomb_set_time = 50  //tenths of a second
		level.bomb_explosion_radius = 1054  //quake units
		level.bomb_use_distance = 128 //quake units
		level.bomb_damage = 200
		level.bombusefov = 30

		level.subtitleX = 100
		level.subtitleY = 50
		level.allieswin = 0
		// set the parameters for this round/wave based match
		level.clockside = axis // set to axis, allies, kills, or draw
		
		spawn script_model "targetname" "bomb1" "model" "items/pulse_explosive.tik" "origin" local.bomborigin
		local.crate = spawn script_model "targetname" "fakecrate" "origin" ( -1346 -907 305)
		
		wait 1.0
		$bomb1.trigger_name = spawn trigger_use "origin" $bomb1.origin targetname "Bomb1Trigger"
		$bomb1.explosion_fx = "fx/fx_flak88_explosion.tik"
		$bomb1.explosion_sound = "explode_aagun"
		waitframe
		$bomb1.angle = -90
		$bomb1.trigger_name setsize ( -40 -40 -40) (40 40 40)
		if($fortcrates)
			thread bomb_exploded $bomb1 $fortcrates
		$bomb1 thread bomb_thinker
 

	  	thread allied_win_bomb
		thread axis_win_timer

		addobjective 1 1 "" $bomb1.origin
		setcurrentobjective 1
End