Skip to content

SetPlayerRiderHeadHit

Turns the head hit on low branches and beams on or off for a rider - the game’s own throw.

The game throws a rider whose head meets a branch, a beam or a canopy at speed; it is on by default, as in the game. With false the rider passes under the obstacle instead - no fall, no OnPlayerThrown - while a horse throwing them and ThrowPlayerFromHorse still work (SetPlayerRiderThrow turns those off too). It lasts until you change it or the player leaves, through respawns, and is sent to their game with every spawn: call it once in OnPlayerSpawn for a mode where the trees are not a danger.

SetPlayerRiderHeadHit(pid [, enabled])
Parameter Type
pid number the rider
enabled boolean false for no fall from a head hit; true (the default, also when left out) for the game’s own rule (optional)

boolean - false when the player is not connected

function OnPlayerSpawn(pid)
SetPlayerRiderHeadHit(pid, false) -- a peaceful ride: the branches are only scenery
end

SetPlayerRiderThrow · OnPlayerThrown · the Horses group of the index