Half-Life 2

Half-Life 2

PlayerLib
Hds46  [developer] 18 May @ 5:52am
Tutorial for developers
Disclaimer:
This tutorial appropriate only for those who know how to use cfg scripting in Source Engine. This wouldn't teach you basics on how to make scripts.

Description:
Some custom scripts (those that use logic_measure_movement) will break logic_playerproxy derived scripts. To ensure this will not happen this addon pre-spawns logic_playerproxy and point_servercommand to avoid duplicates.
To reference to logic_playerproxy use "playerproxy_custom" as targetname.
To reference to point_servercommand use "ph_concommand" as targetname.

Usage example:
-Make a script file for Script Multiloader in "custom_scripts" folder. For example: 162.cfg
-Open with notepad or other text editor and put the code below:
wait 167; ent_fire playerproxy_custom addoutput "PlayerDied ph_concommand,command,play vo/npc/male01/ohno.wav 0,1" 0 0 1
-You can use pre-spawned "ph_concommand"(point_servercommand) entity to enter various console commands on player death.
-Always try to change "wait (-value-):" to a different number because setting a lot of stuff to the same frame will overload the engine.
-Save and upload your script to workshop if you want.
-Add this addon and Script MultiLoader as a required items.
Last edited by Hds46; 18 May @ 6:09am