Dynamic Data HudMessage
Hi. So i wanted to make a hud message that will display current weapon name. So the problem is that if player changes weapon then hud message must be changed too. In this case i made a task with interval 0.2 seconds and every time it loops all players and sets hud message with current weapon name.
But i think this is not pretty efficient because if players holds a gun much time and doesnt change it often then the loop will have no sense. I just wonder is there any method to overlap current hud by reseting the previous one or something like this? Or maybe i can reset channel on curweapon event and set hud message back with modified message? |
Re: Dynamic Data HudMessage
show your current code,
curweapon to change weapon name + hud sync (hud message hold time = 99 ) + clear hud on client death. |
Re: Dynamic Data HudMessage
Quote:
|
Re: Dynamic Data HudMessage
I did that but every time i change weapon it looks like clearsync doesnt work and hud is overlapping . It's green and if i switch the weapons fast then hud message starts to become white and ugly.
It looks like previous message didn't dissapear and new one is overlaping it. tried fadeout 0.0 - no result. It's not logic, i don't understand how the hell such thing can happen. PHP Code:
|
Re: Dynamic Data HudMessage
remove the task and ClearSync only at client death.
PHP Code:
|
Re: Dynamic Data HudMessage
Quote:
+ i can't remove task because if player doesnt change weapon then hud will dissapear after 6 seconds. I managed to make a global task and loop all players every 0.5 seconds but i think it's not efficient and even if i do this way then hud will blink akward and it's anoying. |
Re: Dynamic Data HudMessage
change HUD_TIME to 600.0 for example and it will not dissapear and use clearsync to remove it at client death.
|
Re: Dynamic Data HudMessage
Quote:
So i must reset task in ham deploy every time weapon changes. |
Re: Dynamic Data HudMessage
Quote:
|
Re: Dynamic Data HudMessage
I understand now. The problem is that if i use smaller task like 1.0 or 0.5 then the fade in effect (that cannot be changed) is repeating at least 1 time per second and it makes illusion that text is blinking.
But if I set a task with longer time like 30 seconds then it's ok. But when i try to clear synchud at item deploy and start a new message with modified string then it starts to overlap and text becomes white and messy. |
| All times are GMT -4. The time now is 22:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.