Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Replicating the binoculars bug?

  1. #1
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts

    Replicating the binoculars bug?

    Is it possible to replicate the binoculars bug that forces you to change whoever you're spectating?

    I'm not sure exactly what causes the bug so I don't know how to replicate it.

    I'm trying to prevent players from spectating bots or try and hide/replace the bot's name that shows while spectating them.

    Attempts to hide/replace the name has failed thus far so am wondering if forcing them to stop spectating a bot is possible?


    I believe this glitch may have been fixed in 1.3 but i'm using 1.0 so no worries there.

    This is for a project I have been working on for awhile, changing bot names.

    Progress so far;
    Click image for larger version. 

Name:	shot0067.jpg 
Views:	151 
Size:	349.3 KB 
ID:	697
    Click image for larger version. 

Name:	shot0068.jpg 
Views:	146 
Size:	327.1 KB 
ID:	698
    ^ Those are all bots.

    This is pretty much the last thing I need to fix name-wise.
    Last edited by filthy_freak_; 2nd May 2014 at 16:45.

  2. The Following 2 Users Say Thank You to filthy_freak_ For This Useful Post:

    Invictus (25th June 2014),serthy (2nd May 2014)

  3. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    You could try to monitor the attack button and cycle this way through all players and set these variables:
    Code:
    spectator.spectatorclient = player getEntityNumber();
    spectator.psoffsettime = 0;
    spectator.archivetime = 0;
    However this does not prevent the spectator from pressing the right mouse button, maybe unbind the mouse buttons while spectating and rebind when spawned via clientcmd-method?

    Or when all bots are in the same team you could use some parts out of the maps\mp\gametypes\_spectating.gsc?


    EDIT:

    i like this layout
    how did you changed the font of the 'You killed'?
    Last edited by serthy; 2nd May 2014 at 17:01.

  4. The Following User Says Thank You to serthy For This Useful Post:

    filthy_freak_ (2nd May 2014)

  5. #3
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by serthy View Post
    You could try to monitor the attack button and cycle this way through all players and set these variables:
    Code:
    spectator.spectatorclient = player getEntityNumber();
    spectator.psoffsettime = 0;
    spectator.archivetime = 0;
    However this does not prevent the spectator from pressing the right mouse button, maybe unbind the mouse buttons while spectating and rebind when spawned via clientcmd-method?

    Or when all bots are in the same team you could use some parts out of the maps\mp\gametypes\_spectating.gsc?
    Hmm none of those sound like a good solution. I'm just hoping there is a way I could somehow make the bots open & close their binoculars all the time, without interrupting movement and ability to fire, or atleast duplicate the bug the binoculars cause.

    I'v already tried making a player.hud element and set foreground to true hoping it would simply cover the bot's name, no luck.

    EDIT:
    Quote Originally Posted by serthy View Post
    i like this layout
    how did you changed the font of the 'You killed'?
    I made it from scratch using hud elements and setting hud.font to console font. That makes the font monotone and easy to calculate where things need to be.
    Last edited by filthy_freak_; 2nd May 2014 at 17:11.

  6. #4
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by filthy_freak_ View Post
    I'v already tried making a player.hud element and set foreground to true hoping it would simply cover the bot's name, no luck.
    you also set the hud.sort to its proper value? (i dont know this value tho..) i also tried to change this but without much script work etc it seems impossible, for me its not worth the amount of work to be done.

    EDIT:

    yeah, but how did you hide then the standard 'Killed by' and 'You killed'?
    Last edited by serthy; 2nd May 2014 at 17:14.

  7. #5
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by serthy View Post
    you also set the hud.sort to its proper value? (i dont know this value tho..)
    Not 100% sure what this does yet but i'll fiddle with it.

    Quote Originally Posted by serthy View Post
    it seems impossible
    Yeah and thats what they said about having custom bot names. I just hope there is a solution that doesn't require me making it too unrealistic.

    Quote Originally Posted by serthy View Post
    yeah, but how did you hide then the standard 'Killed by' and 'You killed'?
    I'm not using the game's obituary at all, so it doesn't send out information like "Killed by" or the "Player 1 [Headshot Icon] Player 2" you see in the killfeed. I made my own obituary from scratch.

    Remove
    Code:
    obituary(self, attacker, sWeapon, sMeansOfDeath);
    from Callback_PlayerKilled

    and you will notice it disables a few things.

    If you want to specifically disable the "You killed" & "Killed by" messages and keep the killfeed/obituary working let me know, there is another way to disable it.
    Last edited by filthy_freak_; 2nd May 2014 at 17:27.

  8. #6
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    I just tried hud.sort nothing changes whether its set to 0, 1, or 100.

    Here is what it looks like;
    Click image for larger version. 

Name:	bot.png 
Views:	123 
Size:	106.1 KB 
ID:	699

    I could try forcing the spectator to have a menu open which would hide all 2d objects and I could use the menu to display the scores, player name etc.

    However the killfeed/rank info/"Killed by" & "You killed" would be hidden.

    Best solution thus far but still hoping I can find a better one.

  9. #7
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    also tried negative values?
    i know that its possible to draw a hud over the menu ones, however menus huds (hud.menu) is still behind them you want to override

    However the killfeed/rank info/"Killed by" & "You killed" would be hidden.
    There is a workaround, would like to explain this in xf and link the talk in here, intrested?

  10. #8
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by serthy View Post
    also tried negative values?
    Just did, makes the hud disappear completely.

    Quote Originally Posted by serthy View Post
    i know that its possible to draw a hud over the menu ones, however menus huds (hud.menu) is still behind them you want to override
    Yeah I just tried using hud.menu, you are correct.

    Quote Originally Posted by serthy View Post
    There is a workaround
    I know a possible workaround for this using the quickmenu, but doesn't work while spectating.

    You can add me to xf via filthyfreak
    Last edited by filthy_freak_; 2nd May 2014 at 18:14.

  11. #9
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Still open for ideas as me and serthy can't figure out a better solution for now.

  12. #10
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    long story short:
    - the name is drawn on top of all menus and huds, so no overlay is possible
    - editing the localized string tables with alot of newlines only changes the position of the 'Following' prefix, not the name itself
    - same with 'You killed' and 'Killed by' (the name here can be disabled by not using the obituary() function

Posting Permissions

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