AnD4D's Forum Posts

  • Also, another quick question... how does families instance variables work? I can't seem to set any...

  • Hi guys!

    Just wondering if there's a way for an item to change families during runtime.

    Say for example I want a circle to move around the screen and bump into another circle... the player would then lose control of the first, and start controlling the second. I could do this with 1 or two, but say I want to be able to do this with hundreds of circles. I would have a code that reads:

    If family.control touches family.noControl then change family.control to family.noControl and change family.noControl to family.control.

    Hmm... confused myself there. In any case. Anybody got an idea on whether this is possible, and if so, care to share how?

    I can figure out how to have the objects take control of one another like a zombie mode (touch gives player control over additional objects until you're controlling all 100), but I do not know how to have it so you only control 1 at a time.

  • Wish we had this feature... but I don't think we do yet.

    I'd like it if we could have physics objects with a certain var only effect others with the same type...

  • Nope, that's what I see too! The one I put together was just a quick one. My first attempt was a lot slower and more obvious.

    Sooo... does this count as a bug again? Wonder how that snuck back in!

  • Hi Kyatric,

    In my example, I wanted it to shrink whenever it collides, so it's correct the way it works. What I didn't want was the physics to stop.

    I'm pretty sure I'm up to date... at work (lunch... :p) ATM, so I can't check, but I'm pretty sure it's the latest version... I recall having families.

  • http://dl.dropbox.com/u/50465867/WeirdShrink.capx

    An example I quickly pulled together, just to show what I mean. Should it stop in mid-air like that?

  • I had the same problem earlier. I had an object shrink when overlapping another object with physics on. The object just seemed to freeze in mid-air, and then shrink indefinitely, even though the object was only meant to shrink on collision by 1 pixel.

    Sorry I couldn't figure it out, but you're not alone!!!

  • Awww, perfect! Set the density to 1, and then have the formula 1*mass as the force.

    Thank you all very much!

  • Tried that, but when the small and the large items collide, they both bounce off each other equally, where the large object should easily overpower it.

  • I don't think I'm trying to change the laws of physics... if you drop a feather and a cannonball, they will fall at the same speed (ignoring drag and air resistance). That's all I want. Except, I just want to choose which way the gravity is pointing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's the thing... I don't want the heavy objects to be knocked aside as easily as small objects, but I do want them all to travel at the same speed. That's why ideally I would like a change gravity direction setting... but it doesn't appear to exist.

  • Yeah, mass is density x collision area. If you turn off gravity and watch the movement, all items move at the same speed, no matter the size. I can make them the same speed by changing the density of the item, but I can't figure out the formula to set all the items with the same mass.

    **EDIT** Sorry, turn on the gravity.

  • Hi Weishaupt!

    I did originally have the object set up as force... but it didn't work too well. The smaller the object, the faster the force moved it. I wouldn't have thought it would effect this. I have gravity set to zero, but no luck...

  • :( No, impulse doesn't work either... Small objects move faster than the large. Will I have to set the mass to the same?

    **EDIT** Can't figure out how to change the mass... :(