How do I spread an effect between 2 instances when they collide.

0 favourites
  • 7 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • What I'm looking for is to spread a "virus" like effect between 2 (or more) instances of the same object.

    One has the virus, one doesn't but if it comes into contact with the one that does, then it'll spread to the unaffected one.

    If the one with a virus comes into contact with another that has the virus, then obviously there will be no effect at all.

    Thanks

  • you can put an animation with a different color, for example the virus is red and the non-virus is blue and when the virus in the red animation touches the virus in the blue animation, it changes animation and becomes red

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Trying to achieve this without animations.

    In saying that, what you're saying is what I'm trying to do, just not sure on the specifics on how to actually do it properly.

    I'm thinking of it like a spreading fire where one item on fire catches onto other items and sets them on fire as well. I did look up similar examples on the forums and tutorials but couldn't seem to make it work the way I'd hoped.

  • Don't make them the same object, just put two objects sick and well into the same family. All the properties they share are at the family level. When well collides with sick replace well with sick. Ie well spawns a sick and is destroyed.

    yours

    winkr7

  • I think I'd rather use the same object and do it with variables honestly, I have too much code associated with the original object.

  • You should use a variable for this. Use a boolean "Infected" that turn to true when your object is in collision with an infected object.

    Then if you don't want to use an animation, maybe you can create another object over the infected one and use the pin behavior. The new object created can use it's own animation to look like the virus spreading over the first object.

  • I THINK i've managed to get this to work the way I want using families, booleans and possibly some bodging. Here's what I've done anyway.

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