Log in

View Full Version : What is "var.archive = bool;" for ?



raphael
27th February 2023, 22:55
Hello

I found this code in some files and I don't understand what it is for
For example:

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

IzNoGoD
28th February 2023, 20:49
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.

raphael
1st March 2023, 04:26
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

raphael
7th March 2023, 16:38
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)

IzNoGoD
7th March 2023, 17:08
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)

raphael
7th March 2023, 17:48
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...

IzNoGoD
9th March 2023, 17:41
Shouldn't matter. Have you checked from a spectator's point of view (hud element being on the spectatee aka player)?

raphael
11th March 2023, 23:41
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)

raphael
20th March 2023, 03:21
I'm doing some tests again
when hud.archived = false, the spectator doesn't see it

I apologize if I gave false information

raphael
20th March 2023, 06:09
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

raphael
22nd March 2023, 10:51
the .archive flag is set to true/false on hud elements to instruct the engine to make them visible in the killcam

Was you talking about roundcam or both normal killcam and roundcam?

I just noticed the hud that I did set .archived = false doesn't appear on roundcam but does on normal killcam

IzNoGoD
22nd March 2023, 17:02
I've got no clue what roundcam is.

raphael
23rd March 2023, 05:33
During a game today, there is one roundcam where the hud was visible, I will explain why if I figure out

In my files, the killcam at the end of round is called roundcam

I mean the player who killed the last alive enemy produces a roundcam that every players will see.

I'm doing this with "codam" on cod 1.1, sd gametype