Craig Martin

(Official) LUA Scripting Documentation

intersect_box

Box (cubic region) intersection query.


Spec:

intersect_box(
	double x1,
	double y1,
	double z1,
	double x2,
	double y2,
	double z2,
	bool players,
	bool npcs,
	bool display)

Parameters

Returns


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


Example

local x,y,z = get_pos()
if intersect_box(x-20,y,z-20,x+20,y+10,z+20)
then
set_context("target")
add_health_effect(-10)
end

Incomplete

This documentation is incomplete


back