I have made an element and it has a reaction with PHOT and i dont like the fact that the PHOT keeps bounceing off of the element instead of passing through it and actually interacting with it for a bit. How do i make it so that PHOT can pass right through my element?
lua
nah, does nothing.
I think its not possible to do it with Lua because all elements that able to pass PHOT is defined here: https://github.com/ThePowderToy/The-Powder-Toy/blob/541417008e082447d47f33a8a529b98a0eed8a7e/src/simulation/Simulation.cpp#L2123
While im here could someone tell me why this code isnt working
local isweird = 0
local nearphots = 0
for k, v in pairs(sim.partNeighbours(x, y, 3, elements.DEFAULT_PT_PHOT)) do
nearphots = nearphots + 1
end
if nearphots > 1 then
isweird = 1
end
if isweird == 1 then
tpt.set_property("vy", -1, i);
end
Its supposed to make it so when the element is touched with a photon it starts moving up and wolnt stop until deleted but instead it just jump up a bit and has to be touched with another photon to keep going up.
But how to use that command?
sim.can_move(elements.DEFAULT_PT_PHOT,elements.DEFAULT_PT_DMND)
Does nothing