Windows 8: Pin and Unpin Objects Dynamically

1

Stats

2,139 visits, 3,313 views

Tools

Translations

This tutorial hasn't been translated.

License

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.

Published on 17 Oct, 2012. Last updated 19 Feb, 2019

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.

Behaviors

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.

  • 0 Comments

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