Welcome to Tactical Gamer

+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
Discussion: Red Orchestra: Ostfront / Red Orchestra - Map and Mod Development - Player Tags - I found the player tags section of ROHud. I'm going to be looking into it
  1. #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...
    ViewPos = PawnOwner.Location + PawnOwner.BaseEyeHeight * vect(0,0,1);
    HitActor = trace(HitLocation,HitNormal,ViewPos+/*512*/1600*vector(PawnOwner.Controller.Rotation),ViewPos ,true);
    Need to lookup what exactly trace() does...
    GetAxes(PlayerOwner.Rotation, X, Y, Z);
    Dir = Normal(NamedPlayer.Location - PawnOwner.Location);

    if (Dir dot X > 0.0)
    { /* draw player code */
    Hmmm...
    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

  2.  
  3. #2

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    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.

  4.  
  5. #3

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    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.

  6.  

     
  7. #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

  8.  
  9. #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

  10.  
  11. #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=517512
    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

  12.  

     
  13. #7

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    Re: Player Tags

    Excellent news!

  14.  
  15. #8

    asch's Avatar

    Join Date
    Oct 2003
    Location
    Lake Wylie, SC
    Age
    36
    Posts
    11,578

    Re: Player Tags

    Great news. As I posted in another thread, this feature is probably the biggest obstacle to me enjoying the game.

  16.  
  17. #9

    Kaine904's Avatar

    Join Date
    Sep 2005
    Posts
    152

    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

  18.  

     
  19. #10

    |Pz505|Heinz's Avatar

    Join Date
    Mar 2006
    Location
    New Yawk, USA
    Posts
    117

    Re: Player Tags

    the friendly player tag thingy that Tzef is working on sounds excellent. good show man!

  20.  
  21. #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:
    we cannot iterate through all the Controllers using the Level's ControllerList since this data isn't replicated.
    It says in order to replicate thru the controllers I must use this code:
    Code:
    local Controller C;
    foreach RadiusActors(class'Controller', C)
    {
      //Do something with the Controller information
    }
    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.
    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

  22.  
  23. #12

    Kaine904's Avatar

    Join Date
    Sep 2005
    Posts
    152

    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

  24.  

     
  25. #13

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    Re: Player Tags

    Jumpin' jehosaphat!

  26.  
  27. #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

  28.  
  29. #15

    WhiskeySix's Avatar

    Join Date
    Oct 2005
    Posts
    13,482
    Blog Entries
    1

    Re: Player Tags

    GREAT work tzef!!

    |TG-12th|WhiskeySix

  30.  

     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


  
 

Back to top