• Is there a way to use NPC:Disposition and ENT:Visible on client???
    2 replies, posted
I'm wanting to display health meters above NPC and player heads, but regarding the NPC's I wanted to change the color scheme of the health bar based on their feelings about the LocalPlayer() client side. Entity/Visible is server side only, so I can't use that efficiently. NPC/Disposition is also server side only, same story. As much as I'd love to network this info somehow, that's not efficient. I think it's a completely unnecessary use of bandwidth. Is there an easy way to get this information without manual networking?
NPC:Disposition is only available on server as your client doesn't need this information for anything by default so it is not sent. ENT:Visible is not really meant for your use case, use traces instead.
So by default NPC:Disposition() is not sent to client, but I want it on client. Maybe I want my crosshair to turn red when I am at someone who D_HT's me, turn green at someone who D_LI's me. Or what I for sure want right now, is the health bar over an enemy's head being a different color than the health bar over a friend's head. I can't just do it by class, because I have a SWEP that allows me to "hypnotize" an enemy to be friendly, or "enrage" them to hate everyone. Networking the values every frame is not efficient, so. Is there another way I can do this?
Sorry, you need to Log In to post a reply to this thread.