Creating a Drag and Drop Spell Bar

From Unify Community Wiki
Revision as of 16:23, 17 September 2010 by Fishypants (Talk | contribs)

Jump to: navigation, search

Implementing a Drag and Drop Spell Bar:
by Mike Cook.


Description:

I am sure this has been covered somewhere in the Unity Forums, but I couldn't find any relevant information when I was starting out on this, so hopefully this tutorial will help someone starting out with Unity. Basically we will be mimicking the spell bar seen in such games as World of Warcraft, or Aion. Out custom drag and drop spell bar will have the following features:

  • Easily add items to the spell bar.
  • Drag and drop items off spell bar to delete them.
  • Drag and drop item into empty slot to switch its location.
  • Drag and drop item into occupied slot to swap the items.
  • Drag and drop feature will be "sticky" meaning the user will have to drag a ways for the icon to disengage from the slot.
  • Clicking an item will activate it, or use it.
  • Right clicking while dragging will cancel the currently dragged item.

Step 1: Plan what you want to do before you do it

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox