Giving items to other characters

You can give items from the currently selected character to other characters in your party!

These is a big thing for me, because when I started thinking about this, I had absolutely no clue how to do it.

Cheers! 🙂

 

You grab an item and you drag it to another characters face:

123

 

It was a little complicated because I already have a dragging to the left and right of the inventory.

The draggable item will appear on mouse only when the mouse cursor is above the inventory, so as long as the cursor(or finger for mobile) is on the inventory, you can drag the inventory left or right.

Links:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

Android Mobile:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

 

I’m going to enter a little into programming, maybe someone will find this useful.

First thing I created a prefab of a 2D sprite with a default picture and named it “movingItemPrefab”, then I attached a simple script on it named “movingItemController”:

4

 

Then I created a script on the Invetory(it’s more complicated I’ll write only the important parts):

5

6

 

 

I hope this will help someone 🙂 Click on the images to see it better.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s