-
03-27-2006, 06:57 PM #1
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Player Tags
I found the player tags section of ROHud. I'm going to be looking into it once I get back from soccer tonight. Doesn't look easy because I don't understand the way vectors work in UT2004.
Here's some code if someone has some insight...
Need to lookup what exactly trace() does...ViewPos = PawnOwner.Location + PawnOwner.BaseEyeHeight * vect(0,0,1);
HitActor = trace(HitLocation,HitNormal,ViewPos+/*512*/1600*vector(PawnOwner.Controller.Rotation),ViewPos ,true);
Hmmm...GetAxes(PlayerOwner.Rotation, X, Y, Z);
Dir = Normal(NamedPlayer.Location - PawnOwner.Location);
if (Dir dot X > 0.0)
{ /* draw player code */It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-27-2006, 07:28 PM #2
Re: Player Tags
Here's the first thing I found. It's another mutator, and it has some code that might help clarify some things by example.
-
03-27-2006, 08:50 PM #3
Re: Player Tags
My guess, given the code, is that it does a "hitscan." Hitscan weapons are those weapons in other games that are "instant hit" weapons; they don't involve an actual projectile.
Here, it looks like the code gets (computes via another function) the location of the pawn player. The directional portion of the vector indicates the pawn player's orientation, and the scalar portion of the vector indicates the distance from the pawn player's "eyes" to a target. Since this isn't a weapon, there is no damage given to a target upon detection. Instead, when a target is detected via trace(), if it's another (friendly) player and if it's within the proper distance, then the target player's ID tag will display to the pawn player.Last edited by Strag; 03-27-2006 at 10:23 PM.
-
03-27-2006, 11:58 PM #4
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Re: Player Tags
Getting closer...
HitActor = trace(HitLocation,HitNormal,ViewPos+/*512*/1600*vector(PawnOwner.Controller.Rotation),ViewPos ,true);
Not sure about the first two values, they are vectors of where you are looking. The ViewPos+1600+vector(PawnOwner.Controller.Rotation) is telling it to consider drawing tags if you can see them from 1600 unreal units away which is 26.5 meters away, roughly 30 yards.
I believe the issue is this part:
if (Dir dot X > 0.0)
which is giving the 'angle' to which the tag will show up. 0 is perpendicular... I think... Need to do mmore research on this obviously.It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-28-2006, 12:11 AM #5
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Re: Player Tags
Actually, according to this:
http://www.falstad.com/dotproduct/
You see that the code should be drawing tags of anyone within a 180 field of view from your front unless....
I'm missing what:
Dir = Normal(NamedPlayer.Location - PawnOwner.Location);
is doing... Argh.
Just played a game of RO, it's been over a week. Tags certainly do NOT show within 180 field of view, it's only when you target them with your reticule. I need to figure out what this Normal function is doing to these subtracted vectors.Last edited by fldash; 03-28-2006 at 12:35 AM.
It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-28-2006, 11:41 AM #6
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Re: Player Tags
Ah, got some great help. I bet I can have this done tonight!
Since it's a hud extension, I'm going to have to re-do my Black Out mutator and create a 'Hud Pack' mutator with different options/settings for these additional hud tools.
http://www.ataricommunity.com/forums...d.php?t=517512It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-28-2006, 11:43 AM #7
-
03-28-2006, 07:27 PM #8
Re: Player Tags
Great news. As I posted in another thread, this feature is probably the biggest obstacle to me enjoying the game.
-
03-29-2006, 12:20 PM #9
Re: Player Tags
I agree with that. The other day, trying to co-ordinate actions was near immposible. Even when you had, you-you and you go there, you dont really know if they are going there, or what there progress is at all. You also cant tell who you are with when defending, and thus cant point out where people are.
-Kaine
-
03-29-2006, 03:46 PM #10
-
03-29-2006, 04:57 PM #11
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Re: Player Tags
JACKPOT! Well, it seems like it is anyway. I found this:
http://udn.epicgames.com/Two/HeadsUpDisplayTutorial
Which says:It says in order to replicate thru the controllers I must use this code:we cannot iterate through all the Controllers using the Level's ControllerList since this data isn't replicated.Using this I should be able to draw the friendly tags within a certain radius without a problem. The only issue, which is of minor concern, is that this is extra processing required by the client each time the screen is drawn. It'll get a list of actors within a certain radius from the server, trace to them, then determine whether or not to show their tag.Code:local Controller C; foreach RadiusActors(class'Controller', C) { //Do something with the Controller information }It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-29-2006, 05:00 PM #12
Re: Player Tags
By god man, you've hit it!
Very nice, i hope to see this in the server soon!
Also, this might really change gameplay for the better, looking forward to it!
-Kaine
-
03-29-2006, 05:03 PM #13
Re: Player Tags
Jumpin' jehosaphat!
-
03-29-2006, 06:56 PM #14
- Join Date
- Feb 2006
- Location
- Oklahoma City, OK
- Age
- 32
- Posts
- 998
Re: Player Tags
Very raw/unfinished version of this will be up on server 1 tonight - I just finished testing it.
It is by grace you have been saved, through faith - and this not from yourselves, it is the gift of God - not by works, so that no one can boast. Ephesians 2:8-9/NIV
-
03-29-2006, 06:59 PM #15
Re: Player Tags
GREAT work tzef!!

|TG-12th|WhiskeySix
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



Reply With Quote



Bookmarks