Results 1 to 4 of 4

Thread: RPG Inventory

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    RPG Inventory

    hey guys
    ive recently started making an RPG and i dont know how many of you have played diablo, but thats the kind of inventory i am going for. its a basic drag and drop kind of inventory except that while some items do only take up one inventory spot, most take up more. the potions and that kind of small stuff arent an issue but when you get the swords and the armor, that require a number of spots, i ran into an issue. i will try to post a screenshot to indicate what i mean.

    ok, now i can get all the items to move around nicely and all that. my problem is (and youll probably need to look at the screenshot to get past my bad explanation) that you can grab the item at say the bottom right, and so when the drag box appears, the cursor is always at its bottom right. when u let go of the item, it appears in your inventory with the items top left corner being where the mouse was, instead of where the top left corner of the drag box was. anybody have any ideas that may help? all ideas will be greatly apreciated.

    matt

    edit: attachment troubles
    Attached Images Attached Images  
    Last edited by asilaydying; Jun 22nd, 2006 at 11:20 PM. Reason: sorry jpeg was unreadable.. replaced with bmp i think

  2. #2
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: RPG Inventory

    You need to set up some offset variables.

    offsetY = Y - Ypositionofitem. Then take this value away from the mouse position to get the top left of the item. Do this calculation in the mouse down event.
    Rich

    A)bort, R)etry, I)nfluence with large hammer.
    Please take a moment to rate useful posts.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    Re: RPG Inventory

    thanks alot Rich. it was just a matter of finding the right way about it because mousedown didnt register unless it was a rightclicked. something to do with my drag drop system maybe? but its all sorted now.

    on a completely unrelated note, is it possible to run my application in full screen mode? or does visual basic not support this?

    matt

  4. #4
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: RPG Inventory

    yeah just find the form property to remove the bluebar at the top, i can never remeber what its called something like control box then you can just maxize it and it will cover the whole screen.
    Rich

    A)bort, R)etry, I)nfluence with large hammer.
    Please take a moment to rate useful posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width