Jump to content

Select Near Entity and Delete it?


Recommended Posts

45 minutes ago, JohnWatson said:

c_select():Remove() to delete the entity under your mouse

I meant how to select something ( not all of it , just nearby character )

and then delete it 

- this isn't helping because the item is invisible spawner

 

Link to comment
Share on other sites

2 minutes ago, __IvoCZE__ said:

I meant how to select something ( not all of it , just nearby character )

and then delete it 

- this isn't helping because the item is invisible spawner

 

c_find('prefabname'):Remove()

if you don't know the name of its prefab then:

local x,y,z = ThePlayer.Transform:GetWorldPosition() for k,v in pairs(TheSim:FindEntities(x,y,z, 8, nil, {'FX','player','INLIMBO'})) do if v.Transform then print(v:__tostring()..' removed') v:Remove() return end end

this removes the nearest entity to the character that's within at least 8 units

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...