Im making an element that disolves other elements simular to ACID but it keeps disolving itself. I want to check the ID of each particle before desolving it to make sure it isnt the same as its own ID.
How would i get the ID of an element?
No i mean how do i get the element ID of a part by its index.
i want to delete all elements near my element
for k, v in pairs(sim.partNeighbours(x, y, 1)) do
if not getelementtype(v) == vdfl then
sim.partKill(v)
end
end
replace getelementtype(v) with the command
i want to input a specific pixel and it spit out what element that pixel is.
if sim.partProperty(k, "type") ~= vdfl then
for k, v in pairs(sim.partNeighbours(x, y, 1)) do
if sim.partProperty(k, "type") ~= vdfl then
sim.partKill(v)
end
end
this is my code now. but now the element isnt destroying itself but its not destroying anything :/
sim.partProperty(k, "type")
Replace "k" with "v"