BentOnHell's Forum Posts

  • 9 posts
  • I want to move a sprite in an elliptical shape, but I simply can't figure out the math behind it. Any suggestions? I'm not really interested in simulating physics per se and as such I'm not particularly keen on using the physics behaviour...

  • Fantastic. Thanks! Can't believe I haven't thought of that.

  • Is there a way to pick out a sprite from an arbitrarily large pool of sprites, solely based on x-value?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, thanks. Makes sense.

    I managed to implement it somewhat successful. I still have bullets passing through enemies, apparently not as many, though.

    So in order to understand what's going on, I have a question: By what conditions is a collision tested?

    If a bullet collides with an enemy within the repeating pattern (say at 5th repetition out of 10), does that count as a collision? Because of this was the case, moving the bullet 1 pixel would always ensure a collision, right?

    The reason I'm asking is because that's exactly what I've done, then tweak the bullet speed with the amount of repetitions per tick, but as I wrote before, there's still stray bullets.

    Would enlarging enemy hitboxes help?

  • Sometimes when a bullet clearly is on collision course with an enemy, the collision never registers.

    I presume it's because of the bullet - and enemy speed, making the collision never happen since the bullet and enemy simple pass each other during a tick.

    Is there a workaround that doesn't involve lowering bullet speed?

  • That did the trick! Much appreciated!

  • Yeah, alspal seems to to the original poster... Weird.

    Well, I have experimented with the set angle property and spawning the bullet on a custom coordinate. The problem is that as soon as I set the bullet angle, it affects all other bullets currently on screen making previously fired bullets reverse their direction.

  • When I implement bullet mechanics I find it very frustrating that the bullet angle is determined by the angle of the "mother" sprite.

    I miss an imagepoint option to determine in which angle other sprites are spawned.

    So for example, if I fire a bullet from imagepoint 1 i want the potential bullets to fly off in a 15 degree angle, independent of the mother sprite.

  • I'm manually setting the frame of my sprite according to the direction of movement, but in order for my bullets to spawn according to the frame, I have to adjust the angle of the imagepoint. The only problem is: I can't seem to do this without changing the angle of the frame!

    So: Any way to separate the angle of the sprite and the angle of the imagepoint?

  • 9 posts