dop2000's Recent Forum Activity

  • I don't know why it doesn't work for you.

    Try this demo:

    dropbox.com/s/fytd9r6f0x4l5jo/DragWithPadding.c3p

  • Yes, I meant "On drop".

    To add an image into post, use img tag, for example:

    [img=1234]

    It would be much easier to help if you could share your code or your project file.

  • Here is how I did it in my game:

    Paddle width is about 200px, origin point in its center.

    Ball has Bullet behavior, paddle doesn't have Solid behavior.

    Result looks something like this:

    Red line is the normal ball path (as when using "Bounce off solids").

    Blue line is the reflection if you use the formula from that youtube tutorial, which is not very realistic.

    Yellow line is the reflection in my game.

  • I prefer making a separate (invisible) draggable sprite.

    Say, you want to drag a small ball. Add another sprite DragBox, you can make it bigger than the ball, add Drag&Drop behavior to it. Add these events:

    DragBox is dragging -> Ball set position to (clamp(DragBox.x, ViewportLeft,ViewportRight), clamp(DragBox.y, ViewportTop,ViewportBottom))

    DragBox on Drag end -> DragBox set position to (Ball.X, Ball.Y)

    You can change clamp() parameters to limit dragging to some small area of the screen.

  • I think just "name.ext" should work. You can also try "/name.ext"

    Check that the exported file name is also in small letters (not "Name.EXT" for example)

  • You can check some things (screen size, resolution, fullscreen) using Browser plugin.

  • Since cars are moving in one line, you can simply check Y instead of using "overlapping at offset". So you can do something like this to maintain 100px distance between cars:

    For each Cars1
    
     Cars2 compare Y<(Cars1.Y)
     Cars2 compare Y>(Cars1.Y-100) : Cars1 slow down
    
     Cars1 Compare Y<50 
     Cars2 compare Y>(LayoutHeight-50) : Cars1 slow down
    
  • Use Touch.X(layer) and Touch.Y(layer) to get touch coordinates on layer with different parallax. In your case Touch.X(0) and Touch.Y(0)

  • You can simply disable Bullet behavior for player's car. You can also exclude it from the "For each" loop using some condition, for example "Cars1 UID not equal <player's car UID>".

    Anyway, I made a little demo, maybe it'll help.

    dropbox.com/s/qnkaoezzbwp203g/CarsDemo.capx

  • You need to add all car sprites, including PlayerCar, to a family. Actually, you need two identical families - Cars1 and Cars2.

    This will allow you to optimize your code:

    For each Cars1
     Cars1 is overlapping Cars2 at offset (0,-50) -> Cars1 set Bullet disable
     Else Cars1 set Bullet enabled
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Must be an error in the addon - it probably hits an infinite loop.

    It works fine when you drag, move and drop the player sprite very quickly and points are far away from each other. But if you move it slowly and the distance between points is small, it freezes.

    So I guess you need to filter the path - remove unnecessary points.

    Here is a quick fix:

    dropbox.com/s/hvp8jmej1dd9f5i/test_spline.capx

  • Ehh.. what? Everything in Construct are instances of various objects. You are not dealing with objects, you are dealing with their instances.

    If you need to physically keep a group of different objects (instances) together, why not use Pin behavior? You can even add another invisible "base" sprite and pin them all onto it. Then just move the base, and the entire group will move with it.

    If your question is more about logically connecting them together, then it's a different story.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies