Left 4 Dead 2

Left 4 Dead 2

90 ratings
Interneted's Custom Events Lib
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
File Size
Posted
Updated
123.323 KB
15 Dec, 2023 @ 9:23am
24 Apr @ 5:34am
32 Change Notes ( view )

Subscribe to download
Interneted's Custom Events Lib

In 1 collection by Interneted
My VScripts Collection
13 items
Description
SUBSCRIBING THIS ADD-ON ALONE DOES NOT DO ANYTHING!

Description
This library contains custom events that are coded by myself.

When I say custom events, it's not like I am adding extra events to the game, it's just that these events are not built-in functions inside the game that you can use as a hook easily, so I decided to make my own.

In addition, some events are kind of buggy, giving incorrect expected parameter values, fires at the wrong moment, etc.

All the events listed:
  • OnChargerDeathCharge
  • OnDeadstopHunter
  • OnHunterHighPounce
  • OnKillBoomer
  • OnMeleeSkeetHunter
  • OnSkeetHunter
  • OnSkeetTankRock
  • OnSpecialTriggerCarAlarm
  • OnClearSpecial, added in 01/02/2024
  • OnChargerDeathChargeByBowl, added in 18/06/2024
  • OnMeleeCrownWitch, added in 17/12/2024

Calling those events work similarly to VSLib and __CollectEventCallbacks, you just need to put a function of your choice to the table provided, and then it will run every single function inside the table once the event is called.

Keep it mind that a lot of people have different perspective on how the event actually works, so the arguments might not as you expect it to be, this is the reason I call this my own custom events, I splitted it because I might use those events in my future add-ons.

Dear VScripters, if you have any custom events idea in mind, please let me know, I would like to make more if I have some time.

To avoid unnecessary errors caused by other script add-ons, it is recommended to move this add-on to the top of the list to make sure it runs first. If you encountered any console errors related to this script, please do report and send me the error immediately!

Why are hooks in VScript so limited and broken? 😭
18 Comments
Unsants 17 Jan @ 8:04am 
Ok
Interneted  [author] 16 Jan @ 8:56pm 
Unless you have some knowledge with vscript, I don't think an example video would do much. :(
Unsants 16 Jan @ 4:06pm 
I would like to see an example video, so I understand it better:steamthumbsup:
Kayle Tid 4 Oct, 2024 @ 5:02am 
Alright, understood. Thanks for your answer. :luv:
Interneted  [author] 3 Oct, 2024 @ 8:40pm 
@ Kayle Tid
Nope, you don't need VSLib to make mods with this.
Now, I don't know how familiar you are with VScript and decompiling vpk, but to explain, the game has built in events that you can use as hooks, for example like you can do anything you want like printing message to the console when a player jumps, in VScript, it's called OnGameEvent_player_jump.
In a nutshell, VSLib recoded the built in events to simplify coding. Mine does the same thing, except that I make my own custom events using the game's existing events listed in the description.

Simple example when I wrote this code and Include my events lib:
function ICEL_OnChargerDeathCharge::HAHALOL(params, extra)
{
printl("SOMEONE GOT DEATHCHARGED!");
}
When someone got death-charged, it will show 'SOMEONE GOT DEATHCHARGED' in the console.
In my skill detect add-on, I use all of my custom events to print messages to the chat.

Hopefully that answers your question.
Kayle Tid 3 Oct, 2024 @ 6:22pm 
excuse me, I have a question that seems a bit stupid. If I want this to work I have to mod with Vslib right?
And I also have another question about how it will work.
Interneted  [author] 8 Jun, 2024 @ 12:15am 
@cato perhaps this is what you're looking, though it doesn't display the percentage.
miku 6 Jun, 2024 @ 3:16pm 
maybe add the damage % when the tank and witch gets killed / dies (like to show which survivor did how much % of damage)
Interneted  [author] 6 Jun, 2024 @ 10:31am 
I feel violeted.
Queen Blush 6 Jun, 2024 @ 10:17am 
very purple