theubie's Forum Posts

  • inejwstine

    There are some events that would return 3 objects. In your specific scenario onCollision returns just two objects.

  • 1. If two separate collisions happen to occur at the exact same time (rare, but not impossible, right?) each will happen in its own separate event, right? Meaning, there won't be four instances to pick from in the event.

    This is correct. Each collision fire's it's own onCollision event.

    2. If three instances all collide together (I don't even know if this one is possible; just want to make sure my bases are covered) then will there be three to pick from? Or would it fire off three separate events: one for the collision between instance 0 and 1, one for 1 and 2, and one for 2 and 0?

    If your picker returns 3 objects, then they will be object 0, 1 and 2 (0 based) so you would be correct.

  • Sounds like you would like to do something kinda like this.

    Instead of trapping the health variable, you'd want to trap the colour variable into the local variables and test.

    Once I get some sleep, I'll write up a full tutorial on this, since it seems to be something that's been coming up a lot.

  • johnnyl7x

    Good start!

    For the facing issue:

    <img src="http://www.infinitepossibilitygames.com/demos/PlayerFlip/PlayerFlip.png" border="0" />

    Look forward to seeing how this one shapes up!

  • Actually, the problem is with my understanding of Object(x) and not your code. I was under the impression Object(x) respected the picking process, but it doesn't. So, Ball(0).Health < Ball(1).Health was comparing the balls with IID's of 0 and 1. What needs to happen to make it work right is to store the picked ball's health in a local variable then test that like so:

    <img src="http://www.infinitepossibilitygames.com/demos/MultipleInstance/MultipleInstanceCollide2.PNG" border="0" />

    I probably could make it a little more efficient but it's 2am where I'm at and the brain's fried. :)

  • Pick nth instance is exactly what you want. You'd use it like this:

    <img src="http://www.infinitepossibilitygames.com/demos/MultipleInstance/MultipleInstanceCollide.png" border="0" />

  • Yup. We're using the iframe plugin By webvitaly on our site, and it works great.

  • I would use a global variable, like this:

    <img src="http://infinitepossibilitygames.com/demos/BulletSpeed/bulletspeedincrease.png" border="0" />

  • Beyond the scope of the forums here, really.

    I'd suggest if you're using php 5.2 or above to use Json Encode and if you aren't, then do a google search for PHP Json encode function. There are plenty out there you can cut and paste that will properly convert a php array into json.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can slightly alter their angle (aka spray) by setting each one's angle to Sprite.angle(random(Sprite.angle-1,Sprite.angle+1))

  • Are all your sharks moving the exact same direction? If so, won't matter how many you spawn since they'll be directly on top of each other and look like one.

  • I looked at the rest of your capx for anything that would alter the direction the particles were moving. When I noticed the collision/bounce event it looked like the most logical possibility.

    Chalk it up to having similar things happen while developing.

  • Your particles are all spawning on top of each other, which means it triggers your on collision events for them. I rewrote your spawn event to this and it worked fine:

    <img src="http://www.infinitepossibilitygames.com/demos/asteroidspawn/asteroidspawn.png" border="0" />

  • NommingDino

    Did you double check the font color to make sure it's not still the default black?

    Did you put it on it's own layer and set the parallax to 0,0?

  • Your psudo code should work. You have a screenshot we can look at?