You are viewing an old version of this page. Return to the latest version.
Version of 16:34, 28 August 2013 by I need to Update My Profile
Difference between revisions of "LUA:ProcessMelee"
(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
|||
| Line 1: | Line 1: | ||
| − | = LUA Functions: | + | = LUA Functions: ProcessMelee() = |
| − | + | Makes the given spawn attempt a melee attack on the given target | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | ProcessMelee(param1, param2, param3) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' ( | + | ; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (float) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn attacking |
| − | : ''param2'' is the | + | : ''param2'' is the target |
| − | : ''param3'' is the | + | : ''param3'' is the distance between the two spawns |
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed(NPC, Spawn) |
| − | + | ProcessMelee(NPC, Spawn, GetDistance(NPC, Spawn)) | |
| − | |||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will make the spawn attempt a melee attack on the player who hails it |
== Notes == | == Notes == | ||
| − | + | This will try to do a melee attack with both the primary and secondary weapons | |
Latest revision as of 20:26, 28 August 2013
LUA Functions: ProcessMelee()
Makes the given spawn attempt a melee attack on the given target
Syntax
ProcessMelee(param1, param2, param3)
Parameters
- Required - param1 (Spawn), param2 (Spawn), param3 (float)
- param1 is the spawn attacking
- param2 is the target
- param3 is the distance between the two spawns
Usage
function hailed(NPC, Spawn)
ProcessMelee(NPC, Spawn, GetDistance(NPC, Spawn))
end
This will make the spawn attempt a melee attack on the player who hails it
Notes
This will try to do a melee attack with both the primary and secondary weapons