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

L4D2 item outline callback


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eocene
Junior Member
Join Date: Aug 2021
Old 02-12-2024 , 06:48   L4D2 item outline callback
Reply With Quote #1

Hi,

I'm interested in developing plugins for L4D2.
Looking at the source code of existing plugins, it seems straightforward enough, but I am not familiar with the API.

I would like to call a function whenever a player sees an item (weapon, ammo etc) and the blue outline appears.
So, I need to register a callback?

Anybody know if this is possible? If so, how?

Thanks in advance!
Eocene is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-12-2024 , 07:53   Re: L4D2 item outline callback
Reply With Quote #2

I saw that you mentioned that on my plugin thread as well,
but I can't do right know because of time and the plugin become very complicated

What do you mean by "see"?

From any distance OR only when the items are near (when the "E" key is enabled to pickup)
__________________
Marttt is offline
Eocene
Junior Member
Join Date: Aug 2021
Old 02-12-2024 , 09:32   Re: L4D2 item outline callback
Reply With Quote #3

I don't think the plugin needs to become a lot more complicated?

When the player sees an item from within a certain range, the game sets a blue glow on that item.
Up close (within grabbing range), it becomes a white glow.

So, if a callback could be installed that is fired whenever the game creates the blue or white glow, all it needs to do is run the same function that is executed when doing the smartlook vocalization or sm_mark is entered in the console.

As such, marking items would happen entirely automatically. As soon as a player sees something, they all see it.
This way I don't need to ask my players to bind a key to sm_mark in the console.

Ideally, two convvars would be added; one that enables auto-mark when blue glow and one when white glow.

Last edited by Eocene; 02-12-2024 at 09:33.
Eocene 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 02:41.


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