util.Effect

From GMod Wiki

Jump to: navigation, search
Function
Syntax util.Effect( String effect, CEffectData objEffectData, Boolean AllowOverride, ( Boolean IgnorePrediction or CRecipientFilter objRecipientFilter ) )
Where is this used?
Description:
Dispatches an effect using settings found in objEffectData. Usually used after setting up the effectdata object with desired settings.
Returns: nil
Part of Library: Util
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Util.Effect]Util.Effect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a HelicopterMegaBomb effect at the origin of the map (0,0,0)
Used onNewerShared.png
Code
 
local vPoint = Vector(0,0,0)
local effectdata = EffectData()
effectdata:SetStart( vPoint ) // not sure if we need a start and origin (endpoint) for this effect, but whatever
effectdata:SetOrigin( vPoint )
effectdata:SetScale( 1 )
util.Effect( "HelicopterMegaBomb", effectdata )	
 
OutputAn explosion can be seen at point (0,0,0) on the map.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox