How do I get canvases to move after pasting an image onto them?

0 favourites
  • 2 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • Okay so, I'm trying to make a puzzle game where you load an image from your PC, and it cuts it to various pieces. Now, I've already done that, I have a function that creates the proper pieces of Canvas and then pastes the part of the image they're on top of onto them.

    The only problem is moving them after the fact.

    Nothing I do works. If I tell them to change position after pasting the object, they'll just take whatever part of it their new position is. I can't do it with conditions. I can't even change their location on every tick with a condition. The only thing that worked is mapping the shuffle function to a button press and pressing it after everything was finished. Which leads me to believe the issue is the canvas gets finalized at the end of the tick, meaning no amount of moving it before that is gonna work.

    I don't know what to do to fix this. I need to shuffle them as soon as the canvases finish loading, but it won't work properly and I don't know what to do. Any amount of help will be appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Image is pasted on canvas at the end of the tick. So you need to wait 1 tick before moving canvases. Try adding "Wait 0":

    Canvas Paste sprite
    Wait 0
    Canvas set position to random...
    
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)