General > Developers Corner

Here, have a chat indicator.

(1/2) > >>

lavacano201014:
I made a thing for my server (which I'm sure I advertised here once) that basically puts a speech bubble above a player when they have the chat window open (they pressed [by default] Y). It's parented to the player, it (should be) set to be perma-nocollided (MOVETYPE_NONE).

I didn't put it in the Releases forum because it doesn't use ULib or ULX.

I THINK it's the model for the commentary nodes in HL2.

The only real bugs I've found are:

 - You can shoot it and it will react to being shot at.
 - Sometimes, the entity won't get deleted. I haven't figured out what causes this yet. But any ol' player can just remove it if they see someone moving themselves around with an indicator above their head, so no harm no foul.

Both attachments go in lua/autorun. I'm not putting this on Facepunch because I didn't want a bunch of idiots going "i extractd the zip in 2 addons but it doesnt work???" because they couldn't read the OP.

JamminR:
We allow non-ULib releases in the Releases section.
We encourage and prefer ULib related of course, but many other community members have released here.
If you want us to move it, let us know.

Megiddo:
Sweet :)

KnowledgeJunkie:
Do you think this could be added to or replicated in such a fashion as to indicate when players are in other states? I'm thinking specifically:
-Spawn menu open
-Context menu open (Maybe indicates use of a certain tool)
-ULX menu open

I'd attempt this myself, but I don't want to steal, besides the fact I don't have any lua experience, or knowledge of the proper hooks.

Come to think of it (and just to be super duper picky) could this indicator's usage be controlled via groups? So admin can see when users are in certain states, but not newbies? OK done being useless now.


EDIT: OK, I looked at the server .lua, and I'm wondering (agian, noobish here):
Is the reason the prop can be shot (and perhaps why it doesn't delete sometimes) because its spawned as a prop_physics? Can it not be a prop_static or dynamic or what have you with "MOVETYPE_NONE"?

lavacano201014:

--- Quote from: KnowledgeJunkie on June 07, 2010, 11:35:15 PM ---Do you think this could be added to or replicated in such a fashion as to indicate when players are in other states? I'm thinking specifically:
-Spawn menu open
-Context menu open (Maybe indicates use of a certain tool)
-ULX menu open

I'd attempt this myself, but I don't want to steal, besides the fact I don't have any lua experience, or knowledge of the proper hooks.
--- End quote ---

Spawn and context menus are easy enough. ULX menu...not so much. I'd have to edit the actual ULX Menu function, I think. No es bueno.


--- Quote ---Come to think of it (and just to be super duper picky) could this indicator's usage be controlled via groups? So admin can see when users are in certain states, but not newbies? OK done being useless now.
--- End quote ---

No, due to the fact that I'm using server side entities. I really don't wanna take the time to convert it to clientside entities. I'm lazy :-P


--- Quote ---EDIT: OK, I looked at the server .lua, and I'm wondering (agian, noobish here):
Is the reason the prop can be shot (and perhaps why it doesn't delete sometimes) because its spawned as a prop_physics? Can it not be a prop_static or dynamic or what have you with "MOVETYPE_NONE"?

--- End quote ---

I don't know how prop_dynamic works (who uses that anyway?), but prop_static winds up getting compiled in as part of the worldspawn entity (meaning it becomes part of the map), so you can't really add and remove prop_static entities on the fly.

Navigation

[0] Message Index

[#] Next page

Go to full version