Narwhal:Functions

From GMod Wiki

Jump to: navigation, search
Gamemode blue.png Go to:
Narwhal Hooks

Contents

Functions

Narwhal comes with a small collection of functions.

Narwhal Functions

NewerShared.png NARWHAL.GetModule
NewerShared.png NARWHAL.GetModules
NewerShared.png NARWHAL.GetTheme
NewerShared.png NARWHAL.GetThemes

Global Functions

NewerShared.png IncludeModules
NewerShared.png IncludeThemes

Methods

Narwhal has quite a few methods stored in the global NARWHAL table.

Narwhal Methods

There's a reason why there are more methods in the NARWHAL table than there are in the GAMEMODE table. The global NARWHAL table is actually a metatable. When a new index is added, the key value is sent to the GAMEMODE.__Narwhal table. When an index is accessed, it gets retrieved from the GAMEMODE.__Narwhal. Since NARWHAL is a custom table, it will never inherit from other gamemodes that use it, so we make it interface with the GM table which will inherit.

Shared

NewerShared.png NARWHAL:AddAnimation
NewerShared.png NARWHAL:AddValidNetworkType
NewerShared.png NARWHAL:CurrentTheme
NewerShared.png NARWHAL:FetchNetworkedVariable
NewerShared.png NARWHAL:GetNetworkData
NewerShared.png NARWHAL:RemoveNetworkedVariables
NewerShared.png NARWHAL:SendNetworkedVariable
NewerShared.png NARWHAL:SetTheme

Server

NewerServer.png NARWHAL:GetSubscribedVars
NewerServer.png NARWHAL:ResendNetworkedVariable
NewerServer.png NARWHAL:SendCachedVariable

Entity Methods

Narwhal also comes with a set of Entity methods. Most of them are the networking utilities and their aliases.

Entity

NewerShared.png Entity:SendNetworkedBool
NewerShared.png Entity:SendNetworkedInt
NewerShared.png Entity:SendNetworkedFloat
NewerShared.png Entity:SendNetworkedString
NewerShared.png Entity:SendNetworkedAngle
NewerShared.png Entity:SendNetworkedVector
NewerShared.png Entity:SendNetworkedEntity
NewerShared.png Entity:SendNetworkedColor
NewerShared.png Entity:SendNetworkedTable
NewerShared.png Entity:SendNetworkedEffectData
NewerShared.png Entity:SendNetworkedDamageInfo
NewerShared.png Entity:SendNWBool
NewerShared.png Entity:SendNWInt
NewerShared.png Entity:SendNWFloat
NewerShared.png Entity:SendNWString
NewerShared.png Entity:SendNWAngle
NewerShared.png Entity:SendNWVector
NewerShared.png Entity:SendNWEntity
NewerShared.png Entity:SendNWColor
NewerShared.png Entity:SendNWTable
NewerShared.png Entity:SendNWEffectData
NewerShared.png Entity:SendNWDamageInfo
NewerShared.png Entity:FetchNetworkedBool
NewerShared.png Entity:FetchNetworkedInt
NewerShared.png Entity:FetchNetworkedFloat
NewerShared.png Entity:FetchNetworkedString
NewerShared.png Entity:FetchNetworkedAngle
NewerShared.png Entity:FetchNetworkedVector
NewerShared.png Entity:FetchNetworkedEntity
NewerShared.png Entity:FetchNetworkedColor
NewerShared.png Entity:FetchNetworkedTable
NewerShared.png Entity:FetchNetworkedEffectData
NewerShared.png Entity:FetchNetworkedDamageInfo
NewerShared.png Entity:FetchNWBool
NewerShared.png Entity:FetchNWInt
NewerShared.png Entity:FetchNWFloat
NewerShared.png Entity:FetchNWString
NewerShared.png Entity:FetchNWAngle
NewerShared.png Entity:FetchNWVector
NewerShared.png Entity:FetchNWEntity
NewerShared.png Entity:FetchNWColor
NewerShared.png Entity:FetchNWTable
NewerShared.png Entity:FetchNWEffectData
NewerShared.png Entity:FetchNWDamageInfo

Player

NewerShared.png Player:CreateBodyEntity
NewerShared.png Player:GetBodyEntity
NewerShared.png Player:GetBodyModel
NewerShared.png Player:SetBodyModel

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox