Maris Posted December 26, 2014 Share Posted December 26, 2014 Is there any way to get all tags of entity (inst)? Link to comment Share on other sites More sharing options...
rezecib Posted December 26, 2014 Share Posted December 26, 2014 Not that I can find by looking in entityscript. What would you use it for? Link to comment Share on other sites More sharing options...
Maris Posted December 26, 2014 Author Share Posted December 26, 2014 Just want to know what I can find using FindFirstEntityWithTag and FindEntities. Link to comment Share on other sites More sharing options...
Maris Posted December 28, 2014 Author Share Posted December 28, 2014 For example, I want to find all grass in certain range. But there is no tags for grass in grass prefab. Link to comment Share on other sites More sharing options...
simplex Posted December 28, 2014 Share Posted December 28, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now