SlashCo Wiki

Entity

Entity

This contains all function that SlashCo adds on top of Garry's Mod default functions.
Garry's Mod Wiki: https://wiki.facepunch.com/gmod/Entity

Methods

Vector Entity:LocalRandomPosition( number minRange, number range = minRange, number offset = 0 )
Since its creation this function never worked properly due to it never returning the value! Get a position near an entity that it can be near.
Internally just calls SlashCo.LocalizedTraceHullLocator
Entity:PlayGlobalSound( string soundPath, number soundLevel, number vol, boolean permanent )
We advise against using this. It may be changed or removed in a future update. This function is soon to be replaced by the SlashCo.AudioSystem Plays a global sound. This just calls SlashCo.PlayGlobalSound with ent being this
Entity:RandomTeleport( Vector add = vector_origin )
Teleport an entity to a random positon
We advise against using this. It may be changed or removed in a future update. This function is soon to be replaced by the SlashCo.AudioSystem Stops all global sounds for this entity
Entity:StopSound( string soundPath )
We advise against using this. It may be changed or removed in a future update. This function is soon to be replaced by the SlashCo.AudioSystem Overrides GMod :StopSound method