dop2000's Forum Posts

  • On mouse click
    Ball NOT overlapping Wall at offset X:-20, Y:-20
    Ball NOT overlapping Wall at offset X:20, Y:20
     (all the sub-events here)
    

    Clicks will be ignored if ball is within 20 px of the wall on either side.

  • Would I be able to use break loop instead of the comparison, too?

    Yes, you can use "break" - add a sub-event in the loop, in this sub-event check if loopindex>1000, then break loop. But it's easier just to add this condition to the While loop itself.

    Also, since I'd like to have it happen on start of layout, cant this also be done in a single pass?

    You mean add two cells in one loop? Yes, it's possible:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add additional conditions to "On mouse click" event to ignore clicks when the ball is too close to the walls. One way of doing this is with inverted "overlapping at offset" event.

  • There are lots of behaviors that can move sprites. For your situation (move to a point, then stop), I recommend MoveTo addon.

    You can also move without any behaviors:

    On every tick
     Sprite compare Y > 0 : Sprite set Y to (Self.Y-100*dt)
    

    where "100" is the speed (pixels per second)

  • The same way you add all other objects - double-click empty space on the layout and select Touch from the list of available object types.

  • You can pin everything on this layer to some invisible sprite and then just move that sprite. Use families to decrease the number of events.

    There is also an addon called "Layer" by Rexrainbow that allows some layer transitions (fade, scale, rotate), but unfortunately you can't move the layer with it..

  • Set "Force own textture=Yes" on the layer.

    They move your rain sprite in front of the mask sprite and set "Source in" or "Source atop" blend mode on it.

    You can experiment with different blend modes, the important thing is "Force own textture=Yes" setting.

  • Yeah, you can do this with While:

  • I made some changes:

    dropbox.com/s/f5r5tcmm04pna27/BounceBall2.capx

    Bullet angle is unreliable, so I added BallAngle instance variable and changing it with events.

    Bullet angle of motion is set to BallAngle on every tick. "Bounce off solids" is now disabled.

  • Add Touch object to the project and manually replace all Mouse events/expressions with corresponding Touch events and expressions.

    After that you can delete Mouse from the project, Touch will work with both touch screen and physical mouse.

  • I noticed that when uploading an image, file extension should be in lowercase. "Image.jpg" works, "Image.JPG" doesn't.

  • I don't know why, it's just the way it works :)

    Because the same angle can be expressed by different numbers, when dealing with angles you should try using specific conditions and expressions. For example, instead of lerp() use anglelerp(), instead of "Is between values" use "Is between angles" etc.

  • You didn't attach any image.

    If you need to connect two sprites "physically", use Pin behavior. Pin one sprite to another and they will move together and rotate together.

    If you meant "logical" connection, you should try adding them to the same container.

  • You can do this with Chipmunk physics, but I don't know if this addon has been ported for C3.

    With standard Physics behavior you can probably use an invisible sprite with several frames, each with a different collision polygon. Add physics behavior and change frames when necessary. Pin your main sprite to it.