21-10-2008, 06:44 PM
How do i make it so the background thats pink doesnt show inside of the inventory and so it doesnt show ingame too..because If the background is white in my inventory then its white in the game .
[Feature] Visual Inventory
|
21-10-2008, 06:44 PM
How do i make it so the background thats pink doesnt show inside of the inventory and so it doesnt show ingame too..because If the background is white in my inventory then its white in the game .
03-11-2008, 05:33 PM
When I try to add this I'm getting this error:
DD_ItemSurf (Variable not defined)
05-11-2008, 08:41 PM
One way to improve this is remove the useless dims
Dim x As Long Dim y As Long in first sub Dim i As Long in the second sub. and third, and fourth I suppose the Temp Rec is a bit of a waste as well, you only use the vars you input there once, might as well just copy over that data. Dimming both offsets public and using them only once sounds like a waste as well. So seems the code is good, but can be cleared up a bit.
13-12-2008, 03:09 AM
Johny050 Wrote:When I try to add this I'm getting this error: I'm pretty sure Johny050 figured this one out by now, but for anyone else trying to add this, just replace Code: Call DD_ItemSurf.BltToDC(frmMirage.picVisInv.hdc, rec, rec_pos) With Code: Call DDS_Item.BltToDC(frmMirage.picVisInv.hdc, rec, rec_pos) Real simple fix. Also there is alot of work to do for anyone who wants to add this in, its not just a C & P (thought C & P gets the actual picture box to work like it should.)
05-01-2009, 12:13 PM
Sorry for the double post, however, I have a question about how to get this to work.
Here is the problem, the sub works ALMOST correctly. It see's the items as the first pixels in the upper lefthand part of the picVisInv, not the actual blting of the item. I tried messing with the InvPosX, InvPosY, X, Y, and I still can't seem to get it to move off of those pixels. Can anyone help me out with this? I have the standard 32 * 32 pixel items, and a 5 pixel offset between the top and sides of the picVisInv, and 5 pixel offset between the item pics. I know that I need to add in the offset, and the 32 * 32 pixels for the pics so the picItemDesc shows up when actually on the pictue. I wouldn't be too worried about this, I might take it out, however the other subs to drop and use the items are based on this, so scrolling over the actual item and double-clicking etc. does nothing. [spoiler] Code: Private Sub picVisInv_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Edit: I've been thinking a little more into this, and I still do not know what to do to fix this, however I believe that what I need to change is not in the above sub, it's in the IsItem Function. I'm using the default IsItem Function (with only a change of the 4 - 8, just changing the amount of columns of items in the visual inventory. I posted the code below, for anyone to lazy to go look at it above, or who wants a look at my specific code. [spoiler][code]Private Function IsItem(ByVal X As Single, ByVal Y As Single) As Long Dim tempRec As RECT Dim i As Long For i = 1 To MAX_INV If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i) = tempRec.Left And X = tempRec.Top And Y
05-01-2009, 03:37 PM
Ok so finally figured out the problem some people were having with the interaction code.
First change: Code: Public Const InvX As Byte = 11 Code: Public Const InvX As Byte = 30 Then in BltInventory: Code: With rec_pos Code: With rec_pos If there are any more problems let me know.
19-01-2009, 11:47 AM
I added all the code plus all the changes but when i click inventory it not showing the visual inventory
19-01-2009, 01:50 PM
Is it not showing the visual inventory or not showing the picture box? If it isn't showing the picture box, then you just need to add in picVisInv.visible = true into the click inventory button, or if you added it to the frmMirage, you may need to change the height of the frm when you click inventory. If you are talking about the actual items not showing up, make sure that the box is at least 64*64 (that won't be big enough, but it should show at least the first item) and make sure you add "Call BltInventory" into the click of the inventory button.
19-01-2009, 02:33 PM
Im just wondering would it be easier if i made a new form or if i did it in form mirage. I will prolly go with a new form.
19-01-2009, 05:23 PM
skillzalot Wrote:Im just wondering would it be easier if i made a new form or if i did it in form mirage. I will prolly go with a new form. A new form is pointless and will just bloat the fuck out of your exe.
19-01-2009, 09:25 PM
What I did was add it to the bottom of my frmMirage, and when the inventory button was pressed, increased the height as needed, and when the close button was pressed, it set it back to normal.
27-02-2009, 07:27 AM
deathknight Wrote: I'm trying to work this out, everything is perfect and correct but the compiler is being an ass hole and showing me "Invalid Qualifier" for the "DDS_Item". Any ideas?
27-02-2009, 04:51 PM
Lochie Wrote:deathknight Wrote: DDS_Item is now stored in an array. You'll need to re-write the code so that'll it load the surface with the item's number, something like: Code: Call DDS_Item(ItemNum).BltToDC(frmMirage.picVisInv.hdc, rec, rec_pos) And you'll need to edit 'rec' to something like: Code: rec.top = 0 You'll also need to copy and paste the code from one of the other surface checks to make sure the item surface is already loaded, as DFA edited it so unused graphics are unloaded from memory. Tbh, you should make a quick function to handle a check like I did, as it allows use of the graphics loaded into surfaces much easier. Quote:Robin:
27-02-2009, 04:59 PM
Yeah worked it out. Thanks though.
The function check is a good idea, I'll do that tomorrow or something. Can't be bothered to code much, going out tonight so already got alcohol in me. I'll end up either killing the source or scripting something stupid. :?
27-02-2009, 05:23 PM
When I get time I'll update the tut to be up to date.
09-03-2009, 05:20 PM
alright, i can't figure this one out. i've rewritten the code so that is "should" work, yet of course, it doesn't. When i bring the inventory up, it doesn't blt anything, and then when i click the button again, it gives me a "subscript out of range" error, and then i can see it start to blt.
[code]Public Sub BltInventory() Dim i As Long Dim PicNum As Integer Dim sRECT As DXVBLib.RECT Dim dRECT As DXVBLib.RECT If frmMirage.picVisInv.Visible Then frmMirage.picVisInv.Cls For i = 1 To MAX_INV If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i)
09-03-2009, 05:37 PM
I still haven't had the time to see what's new in MS4. One of these days...
09-03-2009, 05:54 PM
The only thing new is the item icon array. Since it uses separate files and such, it has to be done differently.
09-03-2009, 08:28 PM
hence the ready surface, however it says that is what is causing the problem
09-03-2009, 11:15 PM
Debug it.
I think I had a similar problem. It wasn't picking up the ItemNum value and was returning zero in one of the checks. That is what caused it to go out of range. Have a browser through and Step Into the function to check what the values are.
16-03-2009, 04:06 PM
Follow this tutorial the same way as you normally would, but use this sub for BltInventory instead:
[code]Public Sub BltInventory() Dim i As Long, PicNum As Long Dim rec As DxVBLib.RECT Dim rec_pos As DxVBLib.RECT If frmMirage.picInvList.Visible Then frmMirage.picInvList.Cls For i = 1 To MAX_INV If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i)
18-03-2009, 03:32 AM
I seem to have a problem, It won't show the item name.
07-04-2009, 04:26 AM
Im having a problem with the DDS_Item, Im getting a type mismatch before it loads the game windows.
[code]Public Sub BltInventory() Dim i As Long, PicNum As Long Dim rec As DxVBLib.RECT Dim rec_pos As DxVBLib.RECT If frmMirage.picInvList.Visible Then frmMirage.picInvList.Cls For i = 1 To MAX_INV If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i)
30-08-2009, 11:33 PM
i have the same prblm :/
|
« Next Oldest | Next Newest »
|