StartFight
Puts two players in a fight so their games can lock on to each other.
From here either one’s game may pick the other’s body as the opponent - the direction indicators, the combat stance. The
server starts a fight by itself when a swing reaches a body and on /fight <name>; this is the mode’s way (reason
"mode"). On a fight that is already running it restarts the [combat] fight_timeout clock - a duel mode calls it
every second so two circling duelists never lose the lock. false when pvp is off, one of the two is dead or not in the
world, or they are in different virtual worlds. Teammates can be put in a fight, but their hits stay refused.
Syntax
Section titled “Syntax”StartFight(a, b)| Parameter | Type | |
|---|---|---|
a |
number | one player |
b |
number | the other |
Returns
Section titled “Returns”boolean - true when the two fight now
Example
Section titled “Example”-- the arena keeps the duel alive while it lastsSetTimer(function() if duel and duel.live then StartFight(duel.a, duel.b) endend, 1000, true)See also
Section titled “See also”EndFight · AreFighting · GetPlayerOpponents · OnFightStart · the Combat group of the index
