You are viewing an old version of this page. Return to the latest version.
Version of 14:34, 4 December 2013 by I need to Update My Profile
No categories assigned
LUA:Knockback
- Last edited 12 years ago by I need to Update My Profile
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
- param4 is the horizontal movement
- param5 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