How do I solve these issues

0 favourites
  • Hi there,

    I have created a test game (a simple physics canon shoot game). I have few basic errors where I am struck. So here are my issues. Note: I have uploaded the capx file. Kindly check it.

    1. The mouse click is in one side and the shoot is in different side. Shoot is not exactly towards the angle. Check click in different places.

    2. My next issue is I want my level 2 (dummy) to be locked until i finish the level1. (My level 1 is finished when I hit the green square with the ball)

    3. And when i finish my level 1 I want a small layout with stars to show up. How do I create a small layout and how does the stars and points work.

    Thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check this Tutorial:

  • Check this Tutorial:

    thanks for this tutorial .

    Did you check the file. What is the problem with the canon aim shoot

    1. Canon is aiming towards the mouse but the ball goes somewhere else if you click closer to the canon or low down, you can see the problem.

    Help me out here. Thanks a lot in advance.

  • , that is weird... because here the ball goes directly towards the mouse =)

    Your system is perfect here...

  • , that is weird... because here the ball goes directly towards the mouse =)

    Your system is perfect here...

    It is not going fine here, I am testing with mozilla browser, THanks anyways.

    I have a another big doubt, would you help for me.

  • Sure .. "shoot"! =)

    Anyway.. I tried your file on chrome and mozilla.

  • henriquesv Thanks for help. I really appreciate it.

    I am actually trying to figure out the array method for the stars. Hopefully.

  • Your canon balls are colliding with the canon itself. If you remove the solid behavior from the canon then the balls will goto the mouse cursor directly, minus the gravity difference.

  • Mayfly

    What do you mean by "minus the gravity difference"

    And about the canon ball issue: I guessed that canon 's solid behavior will be a problem with the canon ball. But I want the physics animation to look realistic. I dont want the canon ball to go through the canon. What should I do??

  • Making the canon not a solid will make it look the same. It just stops it physically reacting with the canon and making the balls come out funny.

    'Minus Gravity' I meant the canons follow a path to the mouse but will not quite hit it 100% at the cursor as gravity makes the balls arc slightly.

  • Thanks a lot for the detailed explanation and I am sorry for asking again. So now do I reduce gravity or wat???

  • Minus Gravity -> In real world means something like F = g . m ... in this case is the gravity force which is equal its acceleration (~9.8 m/s^2) * its mass. (with negative signal as it goes down).

  • THanks.

  • As for the gravity, you should set the world gravity. For this, use any object, such as the ball that makes use of Physics behavior. Use its action property to change the world's gravity. You only have to make it for one object.

    Like the image below:

    [attachment=0:spqssj1i][/attachment:spqssj1i]

    If you want an "Earth"'s Physics style, leave it as 10. For the "Moon", try lower values such as 3.

  • Thanks Will try soon.

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