FxAddPunchImpact: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Client function}} Creates a punch impact particle effect. ==Syntax== <syntaxhighlight lang="lua"> bool fxAddPunchImpact ( float posX, float posY, float posZ, float dirX, float dirY, float dir...) |
(add oop syntax) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
[[Image:Fxpunchimpact.png|thumb|200px|Punch impact]] | |||
Creates a punch impact particle effect. | Creates a punch impact particle effect (a small dust cloud). | ||
==Syntax== | ==Syntax== | ||
Line 8: | Line 8: | ||
bool fxAddPunchImpact ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ ) | bool fxAddPunchImpact ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Effect]].addPunchImpact}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''posX, posY, posZ:''' the world coordinates where the effect originates. | *'''posX, posY, posZ:''' the world coordinates where the effect originates. | ||
*'''dirX, dirY, dirZ:''' a vector indicating the direction of the effect. | *'''dirX, dirY, dirZ:''' a vector indicating the movement direction of the effect. | ||
===Returns=== | |||
Returns a true if the operation was successful, false otherwise. | |||
==Example== | |||
<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"> | |||
addCommandHandler("pimpact", function() | |||
local x, y, z = getElementPosition(localPlayer) | |||
local gz = getGroundPosition(x, y, z) | |||
fxAddPunchImpact(x, y, gz, 0, 0, 0) | |||
end) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | ==See Also== | ||
{{Client Effects functions}} | {{Client Effects functions}} |
Latest revision as of 20:58, 2 January 2015
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 )
OOP Syntax Help! I don't understand this!
- Method: Effect.addPunchImpact(...)
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