OnFightStart
Two players are in a fight from now on.
Their clients let the game’s lock-on pick each other’s body from here. reason is "hit" (a swing of one reached the
other’s body), "command" (/fight <name>) or "mode" (StartFight). Both players read a chat line about it.
Syntax
Section titled “Syntax”function OnFightStart(a, b, reason) -- ...end| Parameter | Type | |
|---|---|---|
a |
number | one player |
b |
number | the other |
reason |
string | "hit", "command" or "mode" |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnFightStart(a, b, reason) Log(GetPlayerName(a) .. " and " .. GetPlayerName(b) .. " fight (" .. reason .. ")")endSee also
Section titled “See also”OnFightEnd · StartFight · AreFighting · the Combat group of the index
