A with X Collisioning A', making A' have X

This forum is currently in read-only mode.
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • I want to make an event that makes an uninfected family member get infected when it collides with an infected member of the same family.

    So I have something like:

    If Enemy psn == 1

    Enemy collides Enemy: Enemy psn = 1

    But apparently it just sets psn=1 for the already poisoned enemy... how can I solve this?

  • I had a play with the idea and found a way that works

    http://dl.dropbox.com/u/1487524/Scirra/ ... icking.cap

  • Edit:

    Gah! it didn't work on mine, because in the comparison I need to evaluate if enemy psn is different from enemy psn, and apparently it just evaluates agains itself...

    I will try making them into two families just to see if it works, but I suppose it won't (I have many different enemy sprites, so that's why the object solution didn't work)

  • (I have many different enemy sprites, so that's why the object solution didn't work)

    You could fix that by controlling the sprites with a different object than the sprite itself and all sprites use the same object, then the object picking should work.

  • Eh? o.o

  • It happens the same thing that happened with the first cap, in the comparison, one is an object, the other is a family. In my game, both are the same family.

    PS: Beautiful cap, it doesn't solve my problem, but I'll keep it xDDD

  • Both examples run off of what you describe, so all I can suggest is post a cap, and we'll see whats up there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cap is heavy, and my (stupid) internet will surely fail... let me try to tell you the problem just once before I go somewhere else to upload it, ok?

    I have 3 objects (and plan to be more) with different speeds and sprites. They are part of the Enemy family. I have another object called gas. When gas overlaps Enemy, Enemy's private variable psn goes to 1.

    I want the poison to be contagious, so when any Enemy (regardless of object/sprite) touches another Enemy (regardless of object/sprite).

    Your caps assume a sprite hits a family, so that won't work, since I would have to make 3 events, one for each sprite object, which can be fairly easy now, but not when I put like 15 enemies.

    That's why I have a if Enemy that has psn==1 overlaps Enemy, then Enemy psn=1. And the problem is, apparently it just changes the Enemy that already has psn==1.

    I'm sorry for not uploading the cap. I will try to make it in another new cap and upload it, thank you very much to everyone that is trying to help me ;___;

  • You can do that via two families, but if I were you I would go with multiple instances with different frames.

    Families can be a real pain when you start mixing.

  • Eh? o.o

    Here's a cap showing what I meant.


    Edit: Decided to try it with different behaviours moving it towards the mouse and it seems there's an issue with how I did it. Trying to fix it atm.

  • I wish I can do that, but enemies should walk at different speeds, for example ;___; I'll do it your way, object per object, until I find a workaround xD

    Thank you very much! n.n

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