Entity/GibBreakServer

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Warning template)
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=GibBreakServer
 
|Parent=Entity
 
 
|Description=Causes the entity to break into its current models gibs, if it has any.
 
|Description=Causes the entity to break into its current models gibs, if it has any.
  
Line 10: Line 8:
 
Note, that this function will not remove or hide the entity it is called on.
 
Note, that this function will not remove or hide the entity it is called on.
  
'''WARNING!''' Large numbers of serverside gibs will cause lag.<br/>
+
{{Warning|Large numbers of serverside gibs will cause lag.<br/>
You can avoid this cost by spawning the gibs on the client using {{ClassFunction|Entity|GibBreakClient}}.
+
You can avoid this cost by spawning the gibs on the client using {{ClassFunction|Entity|GibBreakClient}}}}
  
 
Despite existing on client, it doesn't actually do anything on client.
 
Despite existing on client, it doesn't actually do anything on client.
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
 +
|Name=GibBreakServer
 +
|Parent=Entity
 
}}
 
}}
 
{{Arg
 
{{Arg

Revision as of 09:42, 23 August 2016

 Entity:GibBreakServer( )

Description

Causes the entity to break into its current models gibs, if it has any.

You must call Entity:PrecacheGibs on the entity before using this function, or it will not create any gibs.

The gibs will be spawned on the server and be synchronized with all clients.

Note, that this function will not remove or hide the entity it is called on.

WARNING

Large numbers of serverside gibs will cause lag.
You can avoid this cost by spawning the gibs on the client using Entity:GibBreakClient

Despite existing on client, it doesn't actually do anything on client.

Arguments

Vector force

The force to apply to the created gibs
Personal tools
Navigation