Craig Martin

(Official) LUA Scripting Documentation

intersect_sphere

Sphere intersection query.


Spec:

intersect_sphere(
	double x,
	double y,
	double z,
	double radius,
	bool players,
	bool npcs,
	bool display)

Parameters

Returns


The context target is set as the closest actor inside the sphere


Example

local x,y,z = get_pos()
if intersect_sphere(x,y,z,40)
then
set_context("target")
add_health_effect(-10)
end

Incomplete

This documentation is incomplete


back