Check if particle exists

  • zaccybot2
    31st Mar 2016 Member 0 Permalink

    I was trying to check if a particle existed by doing 'if tpt.get_property("TYPE", x, y) == a' but is there a dedicated function to do this as this doesn't work?

  • LBPHacker
    31st Mar 2016 Developer 0 Permalink

    Works for me. Try it with "type" (it's all lowercase letters). Anyway, there's sim.partID(x, y) which returns nil if there's nothing at (x; y).

  • zaccybot2
    2nd Apr 2016 Member 0 Permalink

    @LBPHacker

     ah, should've probably tried that, thanks