Compass Objective

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Compass Objective

Post 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?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

urc

Post by tltrude »

The compass is probably controled by a .urc file in the ui folder of pak0.
Tom Trude,

Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post 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.
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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?
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

i have same prob powell,but im running it in TDM.
im guessing it has to be OBJ...Gotcha :wink:
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

This is interesting, all my stuff is obj.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Actually, it is a Round-Based gametype.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

mine says objective added,and objective completed,but the level dont end,or the compass doesnt point to the objective :cry:
Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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
Post Reply