scripted_ents.Alias

From GMod Wiki

Revision as of 16:45, 26 November 2011 by SiPlus (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax scripted_ents.Alias( String from, String to )
Where is this used?
Description:
Creates entity classname alias.
Returns: nothing
Part of Library: scripted_ents
Realm: NewerShared.png β
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Scripted ents.Alias]Scripted ents.Alias [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates alias for Dr. Breen and spawns him.
Used onNewerShared.png
Code
scripted_ents.Alias("npc_breen", "dr_hax")
local breen = ents.Create("dr_hax")
breen:SetPos(Player(0):GetPos() + Player(0):GetForward()*64)
breen:Spawn()
OutputDr. Breen spawned in front of the first player.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox