Windows 8: Pin and Unpin Objects Dynamically

  • 7 favourites


1,713 visits, 2,779 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Using Pin and Unpin dynamically adds an interesting component to your games.

Here is the very simple approach to implementing a Pin to an 8-way object, and then you would move it to the "bag" image leave it on the bag. Just dawned on me that this is basically Drag and Drop, so make sure to check that out as well.

Example used:

Custom Movement (Asteriods) file, see the "Program Files" directory, "Example" Folder.


I then added an image named: DragThingie, added a Pin behavior only. The Player then collides with the DragThingie and now sticks to it. Then I add an image named "bag", which upon collision with the Player and DragThingie, the DragThingie unpins from Player and pins to the bag. Later the Player can collide with the dragthingie and move it from the bag. You would need to set-up a global instance to implement a process to use the dragthingie according to your game logic.


  • Order by
Want to leave a comment? Login or Register an account!