Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phos is our element
- function phosphorus(i, x, y, s, nt)
- local glowtime = 100
- local r = sim.partID(math.random(x-1, x+1), math.random(y-1, y+1))
- if r ~= nil then
- if (sim.partProperty(r, "type") == elem.DEFAULT_PT_FIRE or sim.partProperty(r, "type") == elem.DEFAULT_PT_PLSM) and sim.partProperty(i, "tmp") == 0 then
- sim.partProperty(i, "tmp", 1)
- sim.partProperty(i, "life", glowtime)
- elseif sim.partProperty(r, "type") == phos and sim.partProperty(r, "tmp") == 1 and sim.partProperty(i, "tmp") == 0 then
- sim.partProperty(i, "tmp", 1)
- sim.partProperty(i, "life", glowtime)
- end
- end
- if sim.partProperty(i, "tmp") == 1 and sim.partProperty(i, "life") = 0 then
- sim.partKill(i)
- sim.partCreate(-1, x, y, elem.DEFAULT_PT_SMKE)
- return 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement