dop2000's Recent Forum Activity

  • If you want a mega-ultra-hyper-super simple and easy solution, use the Physics Behavior and this single event:

    I was skeptical, but it really works! I guess Physics collision calculations are more precise than those in Bullet behavior.

    But still, after 10 minutes or so this happened:

  • You can round the angle to 45 degrees after the collision.

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

  • The code seems ok to me. So what happens when you run it?

    Check that the collision polygons are set correctly and that the sprites only overlap one other sprite at 80px offset.

  • cutting a long object into several parts is a bad idea. 1 object (fence) will turn into 5-6, and there can be 100 or more fences and there are still other objects.

    Can you snap them to the grid? That way, the fences in your video would take up 2 grid cells, and you'd only need to cut them into 2 pieces.

    I saw a similar project recently where they ended up cutting the objects using meshes and then combining them into a hierarchy.

  • This means that Russian speech recognition ("Voice typing" on Android) is not installed on the device. Construct uses system speech recognition.

  • ChatGPT explains it better than I could ever do :)

    Explanation:

    LayerToLayerY(...)

    Converts the Y coordinate of the OnscreenMouse sprite from its current layer to the coordinate system of the SmallScreen layer. This gives you the mouse's vertical position as if it were on the SmallScreen layer.

    unlerp(SmallScreen.BBoxTop, SmallScreen.BBoxBottom, <converted Y>)

    Calculates how far vertically the converted mouse Y-position is within the bounds of the SmallScreen sprite.

    If the mouse is at the top of the sprite, this returns ~0.

    If it's at the bottom, this returns ~1.

    If it's halfway down, this returns ~0.5.

    So the result is a normalized vertical position from 0 (top) to 1 (bottom), relative to SmallScreen.

    lerp(SmallScreen2.BBoxRight, SmallScreen2.BBoxLeft, <normalized Y>)

    Now this takes that normalized vertical position and maps it horizontally within the SmallScreen2 sprite — specifically, from its right edge (0) to its left edge (1).

    This is effectively flipping the Y-position into an X-position, which may be used for something like a sideways scrolling effect, or rotating the screen logic 90 degrees.

    Summary in Plain English:

    This expression finds how far down the mouse is on the SmallScreen sprite (top to bottom as 0 to 1), then uses that value to pick a corresponding horizontal position from right to left across the SmallScreen2 sprite.

    You could say:

    “This calculates the vertical position of the mouse relative to SmallScreen, then maps that position to a horizontal coordinate across SmallScreen2, from its right edge to its left edge.”

  • My time zone is AEST - 10 hours ahead of UTC

  • Perhaps something to do with time zones?

  • Try this:

    -> OffScreenMouse: Set position to (lerp(SmallScreen2.BBoxRight, SmallScreen2.BBoxLeft, unlerp(SmallScreen.BBoxTop, SmallScreen.BBoxBottom, LayerToLayerY(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y))), lerp(SmallScreen2.BBoxTop, SmallScreen2.BBoxBottom, unlerp(SmallScreen.BBoxLeft, SmallScreen.BBoxRight, LayerToLayerX(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y))))

    {"is-c3-clipboard-data":true,"type":"actions","items":[{"id":"set-position","objectClass":"OffScreenMouse","parameters":{"x":"lerp(SmallScreen2.BBoxRight, SmallScreen2.BBoxLeft, unlerp(SmallScreen.BBoxTop, SmallScreen.BBoxBottom, LayerToLayerY(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y)))","y":"lerp(SmallScreen2.BBoxTop, SmallScreen2.BBoxBottom, unlerp(SmallScreen.BBoxLeft, SmallScreen.BBoxRight, LayerToLayerX(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y)))"}}]}
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I keep telling you to use the hierarchy. Pin behavior is basically deprecated.

  • Use the same approach:

    if any arrow key is down -> set running animation.
    
    if none of the arrow key is down 
    AND none of the on-screen buttons is touched -> set idle animation.
    
    
  • You still didn't remove the HP addon..

    Anyway, you need to use multiple animations, not stopping/starting a single animation.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 followers

Connect with dop2000

Trophy Case

  • 10-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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies