kriand's Recent Forum Activity

  • You said you wanted to keep the ball in the air by clicking on it and this is the code for that: on click on ball -> apply force at angle

  • Hey Tackla,

    give your Sprite the Physics behavior and make sure to set the Collision mask to 'Circle'.

    Then try this code:

    + Mouse: On Left button Clicked on Ball
    -> Ball: Apply Physics force 500 at angle angle(Mouse.X, Mouse.Y, Ball.X, Ball.Y) at image point 0
    [/code:sxycirn0]
  • Construct 2 won't even find the file when you try to open. Do you have a version of this for C2?

    As I said, you have to use C3. I tried to say that the code, transferred to C2, works there as well. I do not have a capx.

  • Hey nicklowkcmagic,

    it did not work because it is first checked whether your variable is 0 to set it to 1 and after that it is checked whether your variable is 1 to set it to 0. So the variable is 1 for one tick. Try it with 'else':

    + Keyboard: On Space pressed
    
    ----+ Player: FlipGravity = 0
    -----> Player: Set FlipGravity to 1
    
    ----+ System: Else
    -----> Player: Set FlipGravity to 0
    [/code:dabf8hbx]
  • Hey BalthazarTheWizard,

    Here is an example of how it can be implemented. I made it with C3 so please open it there. It should work for C2 as well.

    I hope it will help you.

    c3p-file: 1drv.ms/u/s!Ap_-qxoGKbDccub_B5pnfUs2rSM

  • Oh that one is an side scroller. My method only works with a top down shooter since it calculates the straigth line and not a curve.

    The easiest way is to use the gravity parameter from the bullet behavior, but that does not give you much creative freedom.

    Nevertheless, you should take a look at it:

    c3p file: 1drv.ms/u/s!Ap_-qxoGKbDccDi07YUVviB2-1k

    Edit: I forgot that you want to aim at an object and the arrow should fly different distances. maybe you can use the tip anyway. You should stick to the tutorial you posted.

  • How would you do the arch then? The destroy part on distance traveled makes sense, and seems like an easy solution, but arching is my trouble now.

    What exactly is causing you difficulties?

  • Hey justme5555,

    first I tried the repeat-loop, but somehow it skipped some objects while deleting, as if the loop would run too fast and want to erase some instances twice. But with the Every X seconds condition it should work:

  • Hey jmiller4180,

    that would be an option:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Uglypenguin,

    I do not know exactly how your object should behave. Maybe this code can help you:

  • Hey FabianB,

    I do not know if this is what you are looking for:

    Give the the ScrollTo behavior only to the camera object and use this code:

    + System: Every tick
    -> Camera: Set position to (lerp(Player.X, Mouse.X, 0.3), lerp(Player.Y, Mouse.Y, 0.3))
    [/code:6nl8q8k4]
    
    The layer must have Parallax 100,100.
  • Hello Everybody!

    Just wanted to share my idea, that could be useful for math noobs (like me).

    You can create an invisible TiledBackground and let this one rotate.

    On start of layout, you set the TiledBackgrounds position to your

    Buttons imagepoint and then pin the Button to the TiledBackground (Postion & Angle).

    That would be exhausting if you have many buttons, but it works.

kriand's avatar

kriand

Early Adopter

Member since 28 Mar, 2017

Twitter
kriand has 2 followers

Trophy Case

  • 7-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

9/44
How to earn trophies