Touching multiple elements

  • theDragn
    2nd Dec 2010 Member 0 Permalink
    How would I have the code see if a particle was touching two different elements at the same time? For example, hydrogen touching both oxygen and spark.
  • Xenocide
    2nd Dec 2010 Former Staff 0 Permalink
    You could... Depends how much range you want... and it won't be pretty
  • Hellome
    2nd Dec 2010 Member 0 Permalink
    i am guessing you want to make a hydogen fuel cell capability for your mod?
  • theDragn
    2nd Dec 2010 Member 0 Permalink
    No, I wanted to put in electrolysis. Hydrogen, Oxygen, and Spark touch to make water. And water+spark = hydrogen and oxygen. The latter I know how to do.
  • Hellome
    2nd Dec 2010 Member 0 Permalink
    ahh, surely it would be easier to just do oxygen+Hydrogen like most mods?
  • theDragn
    2nd Dec 2010 Member 0 Permalink
    Yeah, but that would be less accurate.
  • zc00gii
    2nd Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • theDragn
    2nd Dec 2010 Member 0 Permalink
    Oh. I figured it out. Put one if statement to check for the first element, then put another if statement inside of the first to check for the second.
    EDIT: this doesn't work
  • Xenocide
    2nd Dec 2010 Former Staff 0 Permalink
    I tried electrolysis. It failed.

    zc00gii
    You merged it in...
  • tian110796
    2nd Dec 2010 Member 0 Permalink
    What I think is put the oxygen in ctype. Then, when it touches spark, do the reaction.