Garry's Mod Wiki

Entity:Activate

Entity:Activate()

Description

Activates the entity. This needs to be used on some entities (like constraints) after being spawned.

For some entity types when this function is used after Entity:SetModelScale, the physics object will be recreated with the new scale. Source-sdk-2013
This crashes the game with scaled vehicles.

Example

Spawns a 'sent_ball' on the player.

function ENT:SpawnMe(ply) local SpawningPos = ply:GetPos() local ent = ents.Create("sent_ball") ent:SetPos( SpawningPos ) ent:Spawn() ent:Activate() end

Page Links


Special Pages


Wikis

?

Render Time: 29ms

Session 0
DB GetPage 3
Generate Html 4
SaveChanges 8
Render Body 0
Render Sidebar 12