Simple conduction logic

0 favourites
  • 11 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Hi, I'm trying to do a simple heat conduction system using a 'Source' & some 'Conductor' sprites. These have a 'hot' instance variable & 2 animation frames for the cool & hot states:

    <img src="" border="0" />

    As you can see, the part I'm stuck on is getting conductors to set the hot variable of other touching conductors.

    Any ideas? Here's a capx in case anyone wants to fiddle:

    Thanks :)

  • Here's two possible solutions:

    One using families... conduction1.capx (r110.2)

    and the other using an extra hidden sprite to check for overlaps... conduction2.capx (r110.2)

  • Thanks! This is very helpful in learning Construct's subtleties.

    Families are the elegant solution (I'm tempted to shell out the 80 quid just to play with them), & the 2nd hidden sprite example is very clever. Since it appears at the end of a chain, provided there's no branching, it could serve some extra visual effect.

  • Another question - here's the setup so far, using ramones first example:

    <img src="" border="0" />

    Now say that the conducting sprites have a 'resistance', & their frame number increases along the connected chain like so:

    <img src="" border="0" />

    Could a family picking method like the one used above do this?

    I've tried making the (what I'm assuming to be a) triggered loop on event #4 into one that iterates the anim frame as it steps through each sprite. That doesn't work & I'm probably wrong about it looping - it might just be picking all connected family members at once...

  • This should do it:

    <img src="" border="0" />

  • Thanks for taking a look. This is similar to where I'm at at the moment- it works for single overlaps but breaks with multiple ones:

    <img src="" border="0" />

    I think I might just stick with the simple conduction...

  • If you make the collision masks beveled like an octagon then conduction will not occur diagonally.

  • nice idea & it works in more situations than before, but still not right...

    <img src="" border="0" />

  • How about this?

    conduction5.capx (r110.2)

  • <img src="" border="0" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Haha nice <img src="smileys/smiley36.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)