Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: What is "var.archive = bool;" for ?

  1. #1
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts

    What is "var.archive = bool;" for ?

    Hello

    I found this code in some files and I don't understand what it is for
    For example:
    Code:
    self.hitblip.archive = true;
    Is it to save some memory ?
    When to do that ?
    Is it used only for client hud elements ?

    I can't find documentation/explanation about that on internet

  2. The Following User Says Thank You to raphael For This Useful Post:

    kung foo man (2nd March 2023)

  3. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,725
    Thanks
    17
    Thanked 1,080 Times in 682 Posts
    the .archive flag is set to true/false on hud elements to instruct the engine to make them visible in the killcam if set to true. As a side-effect (maybe an intended effect?) it also makes it visible to spectators.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

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

    kung foo man (2nd March 2023),raphael (1st March 2023)

  5. #3
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    Quote Originally Posted by IzNoGoD View Post
    the .archive flag is set to true/false on hud elements to instruct the engine to make them visible in the killcam if set to true. As a side-effect (maybe an intended effect?) it also makes it visible to spectators.
    Thank you very much

  6. #4
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    i did some testing, my client hud element is displayed in killcam/roundcam, archive value being true or false

    am i missing something ?

    (using the alive players counter i posted earlier)

  7. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,725
    Thanks
    17
    Thanked 1,080 Times in 682 Posts
    The correct flag would be .archived, instead of .archive. Not sure about the default, but judging by your results it might be set to true by default (since you set a different variable)
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. The Following User Says Thank You to IzNoGoD For This Useful Post:

    raphael (22nd March 2023)

  9. #6
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    I just tried archived instead of archive, I don't notice difference, the hud appears in killcam with true and false

    hmm maybe it is because it's a client hud element, and not a hud element for everyone...
    Last edited by raphael; 7th March 2023 at 17:51.

  10. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,725
    Thanks
    17
    Thanked 1,080 Times in 682 Posts
    Shouldn't matter. Have you checked from a spectator's point of view (hud element being on the spectatee aka player)?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  11. The Following User Says Thank You to IzNoGoD For This Useful Post:

    raphael (22nd March 2023)

  12. #8
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    Quote Originally Posted by IzNoGoD View Post
    Shouldn't matter. Have you checked from a spectator's point of view (hud element being on the spectatee aka player)?
    Using this alive players counter, the hud appears when being spectator, without using .archive/d
    I will tell the result if I try using it
    (sorry for not doing now, i need to take a break, i leave my server open of course, thank you so much kt)

  13. #9
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    I'm doing some tests again
    when hud.archived = false, the spectator doesn't see it

    I apologize if I gave false information

  14. #10
    Deleter/Deleted
    Join Date
    Jan 2023
    Posts
    76
    Thanks
    40
    Thanked 9 Times in 9 Posts
    And now I'm noticing that when hud.archived = false, it doesn't appear in killcam, but does when not using .archived at all
    I'm not sure what I changed, I think the hud was setup again something like that

Posting Permissions

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