Making a particle become nothing

  • camtech56
    May 2015 Member 0 Permalink

    I'm trying to make an element that "absorbs" particles around it. How do you make a particle become empty space?

  • jacob1
    May 2015 Developer 0 Permalink
    @camtech56 (View Post)
    Are you trying to kill the particle? You can use the sim.partKill function.

    Here are some example scripts that loop through sim.neighbors to find other particles.

    Maybe better example:
    for r in sim.neighbors(x,y,1,1) do
    local rtype = sim.partProperty(r, sim.FIELD_TYPE)
    if rtype ~= [yourelementid] then
  • Ahpiox
    December 2017 Member 0 Permalink

    @jacob1 (View Post)

     What about making it slower, because i trying to make gastric acid element, and real gast. acid cant destroy something so fast

  • Sanpypr0
    December 2017 Member 0 Permalink

    @Ahpiox (View Post)

     you could have it set the particle's life value, and when it decrements to 0 it 1. loops back to the value you set, and 2. deletes a random particle around it, that way it doesn't do it super fast

  • Ahpiox
    December 2017 Member 0 Permalink

    @Sanpypr0 (View Post)

     Thanks, but i found ahother way: i just randomized this process. It is if variable value (which is math.random) equals to 4, then it melt something.

    Sorry for my good english, because this lang is not my native