Pscn and Cray (sprk) deletes too much

  • Sean222
    7th Jun 2017 Member 0 Permalink

    Pscn and Cray (sprk) deletes much more than it's tmp, despite the wiki saying "when CRAY with ctype SPRK is sparked by PSCN, the exact number of particles as the tmp will be deleted in the path of the beam". I really need to use cray(sprk) in my creation, so help would be appreciated!

  • ssccsscc
    7th Jun 2017 Member 0 Permalink

    Are you sure that you using "tmp" instead of "tmp2"?
    In this save tmp set to 3 and its deleting exactly 3 particle.

  • Sean222
    8th Jun 2017 Member 0 Permalink

    @ssccsscc (View Post)

     OH! It meant delete 3 pixels of things that are already there! Is there a way I can delete a certain specific pixel and nothing else?

  • mark2222
    8th Jun 2017 Member 0 Permalink

    @Sean222 (View Post)

    Use tmp2 to set the position where CRAY starts acting.

    https://powdertoy.co.uk/Wiki/W/Element:CRAY.html

  • Sean222
    9th Jun 2017 Member 0 Permalink

    @mark2222 (View Post)

     Yes but how would that help? I need cray (sprk) to delete this one pixel and nothing else.

  • mark2222
    9th Jun 2017 Member 0 Permalink

    @Sean222 (View Post)

    Say you want to delete the particle at the third pixel away from CRAY. Set tmp=1 and tmp2=2 (skip 2 pixels before deleting 1 particle). Note however that if there isn't any particle at that location, the CRAY would search forward until it finds a particle to delete.

     

    If you don't want that to happen, you'll need to either use DMND to stop the search or, if that's not possible, use DRAY in place of CRAY to copy an empty space into that location. Of course if you're guaranteed to always have a particle ithere whenever you activate the CRAY, the original method is fine.

  • Sean222
    10th Jun 2017 Member 0 Permalink

     

    @mark2222 thx! I think I"LL use dmnd