FxAddPunchImpact: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
==Example== | ==Example== | ||
This | <section name="Client" class="client" show="true"> | ||
This example will create a Punch Impact Effect next to you when typing ''/pimpact'' in the Chatbox. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("pimpact", function() | |||
local x, y, z = getElementPosition(localPlayer) | |||
local gz = getGroundPosition(x, y, z) | |||
fxAddPunchImpact(x, y, gz, 0, 0, 0) | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Client Effects functions}} | {{Client Effects functions}} | ||
Revision as of 12:21, 25 May 2012
Creates a punch impact particle effect (a small dust cloud).
Syntax
bool fxAddPunchImpact ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ )
Required Arguments
- posX, posY, posZ: the world coordinates where the effect originates.
- dirX, dirY, dirZ: a vector indicating the movement direction of the effect.
Returns
Returns a true if the operation was successful, false otherwise.
Example
Click to collapse [-]
ClientThis example will create a Punch Impact Effect next to you when typing /pimpact in the Chatbox.
addCommandHandler("pimpact", function() local x, y, z = getElementPosition(localPlayer) local gz = getGroundPosition(x, y, z) fxAddPunchImpact(x, y, gz, 0, 0, 0) end)
See Also
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed