Jump to content

HasTag, AddTag


Recommended Posts

For example, I want to find all grass in certain range. But there is no tags for grass in grass prefab.

local function FindAllGrassInRange(center, radius)	local grass_insts = {}	for _, inst in ipairs( TheSim:FindEntities(center.x, center.y, center.z, radius) ) do		if inst.prefab == "grass" then			table.insert(grass_insts, inst)		end	end	return grass_instsend
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...