Detect if element is not touching anythi

  • Hecker
    13th Nov 2021 Member 1 Permalink

    -ng

     

    to detect if an element is touching i used

     

    for r in sim.neighbors(x,y,1,1) do
            if (sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR)
     end
    end
     
    it detects when touching water, is it possible to detect if it is touching nothing?
  • ArolaunTech
    18th Jan 2022 Member 0 Permalink

    The "ss" argument will return the number of empty spaces around an element.