You are viewing a potentially older version of this package. View all versions.
Team036-WeaponCallbacks-1.1.0 icon

WeaponCallbacks

Modding resource. Provide some useful callbacks.

By Team036
Date uploaded 3 months ago
Version 1.1.0
Download link Team036-WeaponCallbacks-1.1.0.zip
Downloads 213
Dependency string Team036-WeaponCallbacks-1.1.0

README

This mod provides some useful functions in client.

You should not install this until you are told.

The satchel entity is goint to be invalid in a short time after deployed. So its almost impossible to use GetOrigin() access to the position of the satchel.

Functions

scripts\vscripts\weapons\mp_weapon_satchel.nut


// table collisionParams =
// {
// 	pos = pos,
// 	normal = normal,
// 	hitEnt = hitEnt,
// 	hitbox = hitbox
// 	weapon = weapon
// }
// Works only if the satchel has collision with other entity. Player need to fire the satchel with a large dot angle.
function AddCallback_OnSatchelPlanted_Alter(void functionref( entity player, table collisionParams ) callbackFunc )
function AddCallback_OnSatchelCreated(void functionref( entity satchel, entity  weapon) callbackFunc )
// Works only if player manually detonated. 
function AddCallback_OnSatchelDetonated(void functionref( entity weapon  ) callbackFunc )

scripts\vscripts\cl_utility_modded.nut


bool function IsEnemy(entity player)
bool function IsCoreReady(entity player)
bool function HasElectricSmoke(entity player)
string function GetTitanKit1(entity player)
string function GetTitanKit2(entity player)
asset function GetTitanIcon(entity titan)