question on target_location entity

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
dghost77
Posts: 174
Joined: Tue Aug 23, 2011 8:28 pm

question on target_location entity

Post by dghost77 »

Hi!

I have found back my old quake 3 ctf map in my backup that I've started working on a couple of years ago and now I want to finish it. I was following the instructions for making it compatible with Team Arena and Threewave CTF. One of the requirements for it is to put target_location entities in the map for reporting the player positions when team chatting or based on certain events (like dropping an item).

From what I understand, for this to work, I created a target_location entity, and then placed it at the player level right on the floor. I just need then to create a key message with the value of the text that I want to display, like message=red flag base and the other key is for the color of the text so count=1 for red.

Am I doing this right? Because it's certainly not working for me. When I stand in my map after compilation like right in front the the target_location entity and trying team chat or dropping an item I always get the text that says unknown location being displayed.

thank you for your time and suggestions.

DGhost
deqer
Posts: 298
Joined: Mon Dec 28, 2009 6:30 pm

Re: question on target_location entity

Post by deqer »

It only works if you have multiple target_locations placed throughout your map.

And yes, color code your messages. red "^1Base" blue "^4Base" red "^1Base Front", etc.
dghost77
Posts: 174
Joined: Tue Aug 23, 2011 8:28 pm

Re: question on target_location entity

Post by dghost77 »

I already got 3 target_location with message and count keys placed in my red base but still, no luck. Maybe I need to put more?
[b]DG[color=#0040FF]host[/color][/b]
[url]http://www.dghost.com[/url]
deqer
Posts: 298
Joined: Mon Dec 28, 2009 6:30 pm

Re: question on target_location entity

Post by deqer »

count keys? is that a Team Arena thing? all I have is something like this:

{
"classname" "target_location"
"message" "^1Base"
"origin" "-2648 -319 128"
}

for original q3.
dghost77
Posts: 174
Joined: Tue Aug 23, 2011 8:28 pm

Re: question on target_location entity

Post by dghost77 »

I'm not sure if it's from TA or Q3A, my guess would be Q3A, from the GrkRadiant manual :
target_location
Map Entity Color: Dark Green
Dimensions: (-8 -8 -8) (8 8 8)
Game Function: Location marker used by bots and players for team orders and team chat in the course of Teamplay games. The closest target_location in sight is used for the location. If none is in sight, the closest in distance is used.

Keys
Message: name of the location (text string). Displayed in parentheses in front of all team chat and order messages. Shorter is better.
count: color of the location text displayed in parentheses during team chat. Set to 0-7 for color.

0 : white (default)
1 : red
2 : green
3 : yellow
4 : blue
5 : cyan
6 : magenta
7 : white
The count key value is only for the color code of the text being displayed. From the original notes for mapping for threewave a note was added to this definition from the manual :
Note from Johnny Law Re Above:
The Radiant manual is incorrect about the way target_location entities work. If you examine the gamecode source you can see that Q3 just selects the closest target_location in the Potentially Visible Set. Line of sight is not involved. I just about pulled my hair out trying to get target_locations to work predictably before I discovered that.
DGhost
[b]DG[color=#0040FF]host[/color][/b]
[url]http://www.dghost.com[/url]
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: question on target_location entity

Post by fKd »

damn it, did not kow you have to colour code me... another thing to fix in q3ctfp22 :/
dghost77
Posts: 174
Joined: Tue Aug 23, 2011 8:28 pm

Re: question on target_location entity

Post by dghost77 »

I was just reading the threewave mapping instructions, it says that for target_location, just to give it the team color for the point of the target and white for the ones located in the middle of the map, 0=white, 1=red 4 = blue

Now I just found out that my target_location are working perfectly well in team arena, just not in threewave ctf. And I was following the instructions from Threewave to make those.

Wow that's bugging me even more now that I know it's working in TA.
[b]DG[color=#0040FF]host[/color][/b]
[url]http://www.dghost.com[/url]
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: question on target_location entity

Post by themuffinman »

Yep, 3W for some unknown reason uses count keys instead of text colorisation carots. Well, here's one from q3wcp5:

Code: Select all

{
	"spawnflags" "0"
	"classname" "target_location"
	"count" "1"
	"message" "Red Flag"
	"origin" "-216 2616 8"
}
Not sure what the spawnflags 0 is about though. So if you copy that it should have color in 3W, but not TA. To get around that you could possibly have 2 different target_location's - one compatible with 3W and set with "notta" "1" and a TA compatible one with "notq3a" "1".
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: question on target_location entity

Post by Eraser »

Settings "spawnflags" "0" is the same as omitting the spawnflags key alltogether.
dghost77
Posts: 174
Joined: Tue Aug 23, 2011 8:28 pm

Re: question on target_location entity

Post by dghost77 »

TheMuffinMan : Thank you for the example from your map. I've still tried it on my target_location by adding the spawnflag 0 to my target location. It still work in Team Arena but not in 3W again.

Eraser : You are right, 0 is for nothing, so the spawnflags = o is exactly the same has having no spawnflags setup for the entity.

From what I understand from the GtkR manual, the spawnflags are just option/check boxes for some specific properties for entities (like suspended). Nothing more.

Gaaaaah I'm going crazy. Here's some screenies of my map (it's a space CTF map), just for fun! :

[lvlshot]http://dghost.com/q3/dgctf1_ss01.png[/lvlshot]
[lvlshot]http://dghost.com/q3/dgctf1_ss02.png[/lvlshot]
[lvlshot]http://dghost.com/q3/dgctf1_ss03.png[/lvlshot]
Post Reply