You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:Knockback"
| Line 12: | Line 12: | ||
: ''param3'' is the animation duration in milliseconds | : ''param3'' is the animation duration in milliseconds | ||
; Optional - ''param4'' (float), ''param5'' (float), ''param6'' (int8) | ; Optional - ''param4'' (float), ''param5'' (float), ''param6'' (int8) | ||
| − | : '' param4'' is the vertical movement | + | : ''param4'' is the vertical movement |
| − | : '' | + | : ''param5'' is the horizontal movement |
| − | : '' | + | : ''param6'' is use player heading |
==== Usage ==== | ==== Usage ==== | ||
Latest revision as of 16:49, 6 December 2013
LUA Functions: Knockback()
Plays the knockback animation and can push a player back
Syntax
Knockback(param1, param2, param3, [param4], [param5], [param6])
Parameters
- Required - param1 (Spawn), param2 (Spawn), param3 (int32)
- param1 is the spawn performing the knockback
- param2 is the spawn being knocked back
- param3 is the animation duration in milliseconds
- Optional - param4 (float), param5 (float), param6 (int8)
- param4 is the vertical movement
- param5 is the horizontal movement
- param6 is use player heading
Usage
function hailed(NPC, Spawn)
Knockback(NPC, Spawn, 4000)
end
When the NPC is hailed it will knockback the spawn that hailed it
Notes
To get the knocked on back set param3 to at least 4000 (4 seconds), any thing lower will play the knocked to knees animation