Left 4 Dead 2 Guide

VSLib Developer Guide - Entity & Player Class

Sharing is temporarily disabled

Left 4 Dead 2 Guide

Entity class

The Entity class wraps Valve's entity object and adds a couple of new features. Here's how you can utilize VSLib's entity class:
// You can find an entity by targetname yourVariableNameHere <- Entity ( "targetname here" ); // You can find an entity by classname yourVariableNameHere <- Entity ( "classname here" ); // You can find an entity by index; below, we are finding Player 1 yourVariableNameHere <- Entity ( 1 ); // You can find an entity by its filter yourVariableNameHere <- Entity ( "!ellis" ); // You can set the entity by passing in a Valve CBaseEntity object yourVariableNameHere <- Entity ( ent );
Once you have the Entity object, you can access any of the functions in the link below.

Available Entity Functions and Their Descriptions

Player class

The Player class builds on the Entity class and provides many more functions for Survivor and Special Infected entities. All the functions that are available on the Entity class also works on the Player class, so please see that function list too!
// You can find a player by index; below, we are finding Player 1. // Players 1-4 are usually the survivors, and 4-64 can be valid infected. yourVariableNameHere <- Player ( 1 ); // You can find a player by filter yourVariableNameHere <- Player ( "!ellis" ); // You can set the player by passing in a Valve CTerrorPlayer object yourVariableNameHere <- Player ( ent );
Once you have the Player object, you can access any of the functions below, as well as all of the Entity class functions.

Available Player Functions and Their Descriptions

Tagged

Community Tags

  • VSLib

Guide Credits

You may like

  • Mod
    Brutal Apocalypse
    N/A

    THIS MOD IS USING A VSLIBs scripts. So it might be collided some Vslibs/Vscripts mods THIS MOD DOES NOT WORK ON CUSTOM CAMPAIGNS. ⋙WARNING!!!!⋘ This mod makes the game much more difficult. if you're easy to upset or play serious, you mig...

    22,385
  • Mod
    Guns+ and SI+
    N/A

    it's a vscripts mod. so, can't be used together with mods that alternate gameplay directly(such as Admin System) but works fine with Weapon Script mods since i didn't use weapon script files Works only on Local Host and Singleplay. Does...

    29,577
  • Mod
    Augmented Bots
    N/A

    This mod makes bots pretty stronger than vanilla bots Can not use together with other vscripts mods such as Rectus' Custom weapons, Admin System or any other mods of mine Mod Features - Cs weapons are unlocked - Bots have 150 shield po...

    26,362
  • Mod
    Anti-Trolls System
    N/A

    This mod made to prevent those team killers(aka Trolls) from killing all teammates and abuse vote system >>This mod is using vscripts. so it can not be used together with any other mods of mine or Vscripts driven mods. Such as Admin Syst...

    7,550
  • Mod
    Insanity Worlds
    N/A

    This is a vscripts driven mod Note that this mod doesn't work on any Custom Maps or Official Servers This mod is not mutation. it can runs on every game mode _____________________________________________________________________________...

    14,323

Feedback

Be the first to post a comment!