SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Editing Help (https://mb.srb2.org/forumdisplay.php?f=64)
-   -   Drawing on a specific player's scores HUD. (https://mb.srb2.org/showthread.php?t=43094)

jameds 11-17-2017 09:36 PM

Drawing on a specific player's scores HUD.
 
I have a script that sets a "blind timer" when a player is tagged.
I want to draw on that player's HUD, but the scores HUD hook doesn't take a player parameter.

Rapidgame7 11-17-2017 11:33 PM

It actually does.
When making a function for the HUD hook, the second argument passed to the function is a player.

jameds 11-17-2017 11:46 PM

I'm talking about the scores hud hook.
It only has one parameter, a drawer.

Rapidgame7 11-18-2017 12:40 AM

Oh, I didn't read that.
You could make a local variable outside (and above) a game HUD hook.
This hook would make a comparison to see if the current focused player is blind or not, and stores it in the local variable, which the score HUD would read and draw accordingly.
It won't update when the current player is not blind anymore when the scoreboard is open, though.

jameds 11-18-2017 12:54 AM

That does the trick, thank you very much!


All times are GMT. The time now is 12:37 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.