http://pastebin.com/tbhSpTTN That is the current electrolysis code for IRON... http://pastebin.com/eW3vAgKb That is my edited code, to incorporate hydrogen. For some reason the latter code only produces hydrogen, no oxygen. How would I make it produce both?
I suggest the following code, which should generate twice as much hydrogen as oxygen: if (2>rand()%3) part_change_type(r>>8,x+rx,y+ry,PT_HYDR); else part_change_type(r>>8,x+rx,y+ry,PT_O2);