NumericalHealthHud
by Guy Allard · in Torque 3D Professional · 06/10/2010 (10:43 am) · 5 replies
Just wondering about this. The numericalHealthHud is updated from the server using a commandToClient which sends the players current health.
I'm a little confused by this, as the players health (damage level) is already networked to the client as part of ShapeBase::packUpdate. So that information is now being sent twice.
Would it not be better to simply have the numericalHealthHud running a schedule that updates it periodically?
I'm a little confused by this, as the players health (damage level) is already networked to the client as part of ShapeBase::packUpdate. So that information is now being sent twice.
Would it not be better to simply have the numericalHealthHud running a schedule that updates it periodically?
About the author
Recent Threads
#2
At the moment, every time the players health changes, shapebase sends that info to the client in its packUpdate, then on top of that the scripts send a command to client to update the health hud, and also send the health value (which has already been sent by shapebase pack).
This could be especially important for things like the health pack, which end up doing this 10 times per second.
06/10/2010 (11:19 am)
No, I'm talking about running the schedule on the client. That's pretty minimal.At the moment, every time the players health changes, shapebase sends that info to the client in its packUpdate, then on top of that the scripts send a command to client to update the health hud, and also send the health value (which has already been sent by shapebase pack).
This could be especially important for things like the health pack, which end up doing this 10 times per second.
#3
(personally I cut all of that update_schedule_to_increase_health stuff out completely in favour of an immediate add up to max function)
06/10/2010 (11:45 am)
Oh yeah ... sorry, forgot about the healthpack and it's strange update cycle... (personally I cut all of that update_schedule_to_increase_health stuff out completely in favour of an immediate add up to max function)
#4
06/10/2010 (12:08 pm)
The NumericalHealthHud is only a GUITextCtrl which needs the information it displays sent to it somehow, thus the CommandToClient. Adding a text display feature to the stock HealthbarHud would be a better alternative than the current script based solution (whether it be scheduled or event driven): Platic Gem 41 - Health Bar Upgrade.
#5
06/10/2010 (12:14 pm)
Adding the PlasticGem feature would also obviate the need for that strange update_schedule_to_increase_health stuff of the healthpack/healthpatch.
Associate Steve Acaster
[YorkshireRifles.com]
It only needs to update on damage() and anything that works a heal() function.