JackieChan's Recent Forum Activity

  • Problem Description

    If you hold the left mouse button down while dragging your cursor across the screen, Sprite 1 will move to your cursor's position when you release the left mouse button.

    But if you hold the left mouse down while dragging your cursor across and past the list box object, sprite 1 won't move to your cursor's position when the left mouse button is released.

    This bug also breaks the drag and drop behavior as shown in layout 2.

    Here's a video of the layout 1 bug. The bug starts at 0:08

    https://vid.me/gcDI

    And here's a video of the layout 2 bug. The bug starts at 0:06

    https://vid.me/tiPW

    Attach a Capx

    https://www.mediafire.com/?6bke5d5au6ej9km

    Description of Capx

    Layout 1 moves sprite 1 to the cursors position when the left mouse button is released.

    Layout 2 allows you to drag sprite 2 around the layout with the mouse.

    Steps to Reproduce Bug

    • Hold The Left Mouse Button Down.
    • Drag the mouse over and past the list box object.
    • Release The Left Mouse Button.

    Observed Result

    Sprite 1 will not move to the cursor's position when the left mouse button is released. Also my cursor changes into a black circular caution sign.

    Expected Result

    Sprite 1 should move to the cursor's position when the left mouse button is released.

    Affected Browsers

    • Chrome: YES
    • FireFox: NO
    • Internet Explorer: NO

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Release 228

  • You are right. C2 doesn't know the right moving one needs to be resized so I specified a "ChangeThisOne" variable to tell the difference.

    Also my second request is fixed as well, and it's in the second layout. Here's the finished cap:

    Link: dropbox.com/s/t7d0jravc14y2kc/overlapping%20same%20object%20check%20variables.capx

    Thanks blackhornet! You fixed everything! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • It's almost working, but I actually need the sprite moving right to change it's size to 50,50 not the one that's moving left.

    And why does the sprite in the top left corner, This sprite:

    Why does it have its size changed to 50,50? It should stay the same since it doesn't overlap a sprite with a powerup.

    Sorry about all the questions guys!

    It's just that getting the same object type overlap to work is extremely confusing for me since it doesn't work like a normal overlap between two different object types.

  • No the power value doesn't change with the change in size, but what if I needed it to? Can you show me how to do both?

  • I think of it as the second sprite being a different object.

    Like instead of the 2nd sprite being a green sprite, what if it was a red sprite? If the second sprite was a different object the event would work perfectly, but I need both sprites to be the same object type.

  • I tried changing it to work but it still doesn't. If a sprite with a powerup overlaps another sprite with a powerup only the 1st one should change to 50,50 but it's not working.

    Link: http://www.mediafire.com/download/hg4fv ... ables.capx

  • Thanks I switched to your method and that worked, but in another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both.

    How do I make this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks that does fix this problem, but I have another issue.

    In another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both.

    How would I do this?

  • This still doesn't work. You changed all the sprites sizes to 64,64 but I need them to all be different like in the cap in my first post.

    Does anybody know a fix for this?

  • Thanks but I just tried that and it still doesn't work.

    Link: http://www.mediafire.com/download/jmei3 ... ables.capx

    Does anybody know a good way to pick between two objects of the same type when they're overlapping and compare their variables?

  • Edit: blackhornet fixed the old problem below but now I have a new problem. In another layout of my game If a sprite with a powerup overlaps another sprite with a powerup, only the first sprite's size is changed to 50,50. not both. How would I do this?

    Old Problem: In my game if a sprite with a powerup overlaps another sprite without a powerup, the sprite without a powerup has his size changed to 16,16.

    If a sprite with a powerup overlaps another sprite with a powerup, both their sizes are changed to 50,50.

    I got the second part working, but the problem is when a sprite with a powerup, overlaps a sprite without a powerup the first sprite changes size but it should stay the same.

    How do I fix this?

    Here's the link to my cap: http://www.mediafire.com/download/ron6o ... ables.capx

  • Yeah you can use my link. I don't mind.

JackieChan's avatar

JackieChan

Member since 9 Sep, 2010

None one is following JackieChan yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies