Left 4 Dead 2

Left 4 Dead 2

93 arvostelua
Interneted's Custom Events Lib
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Game Content: Scripts
Tiedostokoko
Julkaistu
Päivitetty
123.323 KB
15.12.2023 klo 9.23
24.4. klo 5.34
32 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Interneted's Custom Events Lib

1 kokoelmassa, tekijä Interneted
My VScripts Collection
14 luomusta
Kuvaus
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 kommenttia
Unsants 17.1. klo 8.04 
Ok
Interneted  [tekijä] 16.1. klo 20.56 
Unless you have some knowledge with vscript, I don't think an example video would do much. :(
Unsants 16.1. klo 16.06 
I would like to see an example video, so I understand it better:steamthumbsup:
Kayle Tid 4.10.2024 klo 5.02 
Alright, understood. Thanks for your answer. :luv:
Interneted  [tekijä] 3.10.2024 klo 20.40 
@ 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.10.2024 klo 18.22 
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  [tekijä] 8.6.2024 klo 0.15 
@cato perhaps this is what you're looking, though it doesn't display the percentage.
miku 6.6.2024 klo 15.16 
maybe add the damage % when the tank and witch gets killed / dies (like to show which survivor did how much % of damage)
Interneted  [tekijä] 6.6.2024 klo 10.31 
I feel violeted.
ChimiChamo 6.6.2024 klo 10.17 
very purple