Windows 8: Pin and Unpin Objects Dynamically

Stats

908 visits, 1,826 views

Translations

This tutorial hasn't been translated.

Tools

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

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