AndreyBitsack's Recent Forum Activity

  • Apply the initial force/velocity at random(360) angle.

    thank you from the bottom of my heart

  • > I'll look forward to it

    Check it out now: fileport.io/RfxzuvMUXVWG

    And what to add to make them all start moving together in a random direction instead of one way

  • You are right.. This should work:

    Thank you very much savior

  • Try this:

    > Characters on collision with Characters
    
    ...Characters NOT hasWeapon : Characters destroy
    
    ...Characters hasWeapon : Characters set hasWeapon to false, Unpin weapon etc.
    

    Characters without weapons will kill each other

  • There are 20 individual sprites, they move randomly. There is one weapon, it's lying down.

    How to make: if one sprite approaches the weapon he picks it up.

    If a sprite with a weapon approaches a sprite without a weapon it destroys it and the weapon falls out.

    If another sprite approaches the weapon, it picks it up and so on in a circle.

    If it is not difficult, please send me the finished project

    Subscribe to Construct videos now
  • > I'll look forward to it

    Check it out now: fileport.io/RfxzuvMUXVWG

    Thank you very much, kind man. Turns out the solution was simple )

    I'm completely happy now !

  • > There is a nuance. When there are many objects (in my case 20)

    > The angle of motion and speed changes

    I didn't know you'd need more than two objets. I'll think of another way to do it for many objets.

    I'll look forward to it

  • For a more deluxe and precise way you could move overlapping objects out of each other and calculate the collision normal at the same time to bounce off of. Construct doesn't have a built in way to do that so here is a way to do it between axis aligned boxes by utilizing an algorithm called the Separating Axis Theorem.

    https://www.dropbox.com/scl/fi/ac5ihr1qp0xpmoj7mtskh/perfect_bounce_w_sat_collision.capx?rlkey=79m2711gc929l9mdm9hjier6n&st=xgf1cgo4

    I take it that for multiple sprites this won't work. I can't figure it out

  • dop2000 That will never happen again if you use this simple code:

    There is a nuance. When there are many objects (in my case 20)

    The angle of motion and speed changes

    Subscribe to Construct videos now
  • I'm happy! Thank you all so much )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Change angle to sprite.angle or whatever name you gave the object.

    Or since you are using the bullet behavior with “set angle” to no, you’d want to use the action:

    “Bullet: set angle of motion” and use dop’s formula with

    round(((sprite.bullet.angleOfMotion+360)%360)/45)*45

    doesn't work

    Subscribe to Construct videos now
  • You can round the angle to 45 degrees after the collision.

    Set angle to round(((angle+360)%360)/45)*45

    I haven't been able to do this for two days, I've done everything else. If it is not difficult you can make me a project and send it to me

AndreyBitsack's avatar

AndreyBitsack

Member since 27 Jun, 2025

None one is following AndreyBitsack yet!

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies