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

[TF2] Player-Following Annotations Snippet


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-01-2014 , 19:01   Re: [TF2] Player-Following Annotations Snippet
Reply With Quote #21

Both methods will yield the same values, and it should work for all clients. I've never seen it always show for client 1, anyways, you'd have to left shift 0 in to get it? Anyways, its good that it works, either way. Geit, you should fix your old plugin, mabye by just making one anno per viewer. Though, I was never able to get the hide annotation event to work, I had to just use the show for long time, show on self for short time method.

2 pow 1 = 2
2 pow 2 = 4
2 pow 3 = 8

1 lsh 1 = 2
1 lsh 2 = 4
1 lsh 3 = 8
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Geit
Senior Member
Join Date: Oct 2009
Location: Home
Old 01-01-2014 , 20:40   Re: [TF2] Player-Following Annotations Snippet
Reply With Quote #22

Quote:
Originally Posted by friagram View Post
Both methods will yield the same values, and it should work for all clients. I've never seen it always show for client 1, anyways, you'd have to left shift 0 in to get it? Anyways, its good that it works, either way. Geit, you should fix your old plugin, mabye by just making one anno per viewer. Though, I was never able to get the hide annotation event to work, I had to just use the show for long time, show on self for short time method.

2 pow 1 = 2
2 pow 2 = 4
2 pow 3 = 8

1 lsh 1 = 2
1 lsh 2 = 4
1 lsh 3 = 8

I'm working on it now - actually got most of it working, I just need to fix some things and bring it up to feature parity with the current version. Currently I've managed:
  • Fixed annotations repeatedly flying in
  • Fixed console spam
  • Fixed "Annotation too close" when annotation has expired
And yeah, the only way to do that is with an annotation per player so I'm currently doing


Code:
    SetEventFloat(event, "lifetime", 99999.0);
    SetEventInt(event, "visibilityBitfield", (1 << client));
    SetEventInt(event, "id", annotation_id*MAXPLAYERS + client);
and using hide_annotation with the same id when the player shouldn't be able to see them.

Last edited by Geit; 01-01-2014 at 20:42.
Geit is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-02-2014 , 02:29   Re: [TF2] Player-Following Annotations Snippet
Reply With Quote #23

I think that's what I did, but the hide annotation event was doing nothing for me, though that was some while ago.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 10-26-2015 , 20:39   Re: [TF2] Player-Following Annotations Snippet
Reply With Quote #24

An update to this. Got it working with a command to enable it....but it's still wonky as fuck.

- I don't know how to save the info for each annotation so that it can be recalled on spawn, aside from using an SQL database to log these things (which I'm a noob at) or with Clientprefs (which I have no fucking idea about).
- When you get within range of someone with a tag enabled, the tag appears stuck to the left side of your screen. It should be visible parented to the head of the person who added it. I've been up and down the code and can't figure out why it's doing this.
- A continuation of #2, the visibility convar doesn't seem to be taking effect anymore as I've got several annotations stuck to my screen on the left side after letting people on my server play around with it. Even after noclipping way out into the void they were still stuck there.
- Here's the weird bit. In thirdperson, they appear perfectly above your own head, but when viewing someone else's, they apparently spawn at 0, 0, 0 (one of my admins said they spawn "in the skybox" so I'm assuming because my map doesn't have a 3D skybox, they are spawning at 0, 0, 0 for some reason)

Here's the plugin thus far:

Spoiler


Credit obviously to Geit for his Annotations plugin giving me somewhere to start. It's a better place to start from than the original snippet I posted in the main post.

Last edited by 404UserNotFound; 10-26-2015 at 20:53.
404UserNotFound 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 15:38.


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