Raised This Month: $51 Target: $400
 12% 

Showing sprites above players head


Post New Thread Reply   
 
Thread Tools Display Modes
FaTony
Veteran Member
Join Date: Aug 2008
Old 01-17-2011 , 16:25   Re: Showing sprites above players head
Reply With Quote #21

Do you bind callback?
__________________
FaTony is offline
CodeMonkey
Junior Member
Join Date: Dec 2009
Old 01-17-2011 , 16:32   Re: Showing sprites above players head
Reply With Quote #22

Quote:
Originally Posted by FaTony View Post
Do you bind callback?
Perhaps I do not understand the useage of Set_Transmit. Perhaps an example for my situation.
CodeMonkey is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 01-17-2011 , 16:46   Re: Showing sprites above players head
Reply With Quote #23

You may not be seeing these sprites because, by default, sprites are not networked entities. The solution is to parent the sprite to a networked entity. All children of networked entities will call SetTransmit.
__________________
dirtyminuth is offline
CodeMonkey
Junior Member
Join Date: Dec 2009
Old 01-17-2011 , 16:48   Re: Showing sprites above players head
Reply With Quote #24

Quote:
Originally Posted by dirtyminuth View Post
You may not be seeing these sprites because, by default, sprites are not networked entities. The solution is to parent the sprite to a networked entity. All children of networked entities will call SetTransmit.
I am seeing the sprites, however the SetTransmit function is not being called.

How would I go about parenting it to a networked entity.
CodeMonkey is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 01-17-2011 , 17:21   Re: Showing sprites above players head
Reply With Quote #25

Quote:
Originally Posted by CodeMonkey View Post
I am seeing the sprites, however the SetTransmit function is not being called.
Ah, that is reasonable behavior to expect. All clients will see the sprite. The next step you're aiming for is showing the sprite to an arbitrary set of clients.

Quote:
Originally Posted by CodeMonkey View Post
How would I go about parenting it to a networked entity.
First, you've got to create a networked entity. A prop_physics_multiplayer will suffice, although there are probably better choices out there. You should be able to find some parenting code via searches here.
__________________
dirtyminuth is offline
CodeMonkey
Junior Member
Join Date: Dec 2009
Old 01-17-2011 , 19:46   Re: Showing sprites above players head
Reply With Quote #26

Hmm it would seem like I need to attach a model to "prop_physics_multiplayer." Even so, this would have the same affect as me parenting this to a client right? When I do the following:
PHP Code:
        SetVariantString(szTemp);
        
AcceptEntityInput(ent"SetParent"entent0); 
(Where szTemp is what I set the targetname of the client)
The sprite does not show up but the SetTransmit method is being called.

Last edited by CodeMonkey; 01-17-2011 at 19:47. Reason: clarification
CodeMonkey is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 01-17-2011 , 20:37   Re: Showing sprites above players head
Reply With Quote #27

Quote:
Originally Posted by CodeMonkey View Post
Hmm it would seem like I need to attach a model to "prop_physics_multiplayer." Even so, this would have the same affect as me parenting this to a client right? When I do the following:
PHP Code:
        SetVariantString(szTemp);
        
AcceptEntityInput(ent"SetParent"entent0); 
(Where szTemp is what I set the targetname of the client)
The sprite does not show up but the SetTransmit method is being called.
In terms of network transmission and appearance, parenting the sprite to a client would have the same effect as parenting the sprite to a model. It is this parenting mechanic that makes the sprite invisible.
__________________
dirtyminuth is offline
CodeMonkey
Junior Member
Join Date: Dec 2009
Old 01-17-2011 , 21:14   Re: Showing sprites above players head
Reply With Quote #28

Ok so how would I go about creating a prop_physics_multiplayer to parent something to it without a model (I believe it generates an error without one.)

Last edited by CodeMonkey; 01-18-2011 at 19:23.
CodeMonkey is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 01-18-2011 , 05:48   Re: Showing sprites above players head
Reply With Quote #29

Why prop_physics, shouldn't prop_dynamic suffice?
__________________
FaTony is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 01-18-2011 , 14:40   Re: Showing sprites above players head
Reply With Quote #30

Quote:
Originally Posted by FaTony View Post
Why prop_physics, shouldn't prop_dynamic suffice?
Most likely. I just started experimenting with the first item that came to mind.

To be honest, I'm not sure if this entire discussion is bordering on exploit territory. I've had posts similar to the PM I sent that were deleted by mods. Hence, I'm going to refrain from delving further into this topic until a mod or more enlightened forum member convinces me otherwise.
__________________
dirtyminuth is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode