multiple transistion

  • jenn4
    6th Sep 2011 Member 0 Permalink
    I know with this function

    {
    r = pmap[y+ry][x+rx];
    if (!r)
    continue;
    if ((r&0xFF)==PT_SALT && 1>(rand()%250))
    {
    part_change_type(i,x,y,PT_SLTW);
    part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
    }

    I can do transistions to elements, but is there any way to make transistion like watr+sand+stne=salt, but only watr+sand or watr+stne=none. So it would need more than two different particles to happen.

    And also can I make it like if they are 10 pixel away from each other and it happens.

    Thanks for help.
  • vanquish349
    6th Sep 2011 Member 0 Permalink
    if ((r&0xFF)==PT_WATR && ((r&0xFF)==PT_STNE)
    {

    is that what you want?
  • jenn4
    6th Sep 2011 Member 0 Permalink
    @vanquish349 (View Post)
    No I guess. I want to know way to make this watr+stne+cnct=asphalt. asphalt is my own element.
    And these elements are 10px away from each other but this still happens.
  • vanquish349
    6th Sep 2011 Member 0 Permalink
    then you would need to mess with alot of code to get that working
  • me4502
    6th Sep 2011 Member 0 Permalink
    @vanquish349 (View Post)
    that wont work, as tpt checks each spot one at a time
  • jenn4
    6th Sep 2011 Member 0 Permalink
    Is it easier without that 10px away think
  • mniip
    6th Sep 2011 Developer 0 Permalink
    10px away will cause REAL LAG
  • PizzaPlatypus
    6th Sep 2011 Member 0 Permalink
    it's been tried before and doesn't work you could make stone+water make mortar and mortar+concrete makes asphalt otherwise it won't work.
  • jenn4
    6th Sep 2011 Member 0 Permalink
  • yangbowen1
    15th May 2012 Member 0 Permalink
    A better idea is:
    When water meet stne, it's tmp turns into 1.
    When water meet water with tmp 1, it's tmp turns into 1.
    When water with tmp 1 meet sand, it turns into salt.

    See also HYGN+OXYG+FIRE=temp increase.