Mirage Source
Visual Inventory (GSD) - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Visual Inventory (GSD) (/showthread.php?tid=216)

Pages: 1 2 3


- halla - 06-01-2007

I got this working. Only problem I am having is that when I double click something all the item images go away in the picboxes. If you click on one it still shows it in the other box and you can still equip stuff. Its just the inventory icons go blank. Any ideas why?

I tried messing with double click to figure it out.


- Rian - 06-01-2007

sound's like the timer isn't working the right way or dosn't haafe the right code.

i've been looking into combing bigreds editor loading tut?anay one tried this? ineed help with it Tongue

ps, i'nm ubery drunk!


- halla - 06-01-2007

Sonire Wrote:sound's like the timer isn't working the right way or dosn't haafe the right code.

i've been looking into combing bigreds editor loading tut?anay one tried this? ineed help with it Tongue

ps, i'nm ubery drunk!

hmm I checked the code for it and its right.

in Double Click code...

Code:
For D = 1 To MAX_INV

in other parts of the code its 0 to MAX_INV - 1

I tried changing to that but then I get subscript out of range.


- Rian - 06-01-2007

halla Wrote:
Sonire Wrote:sound's like the timer isn't working the right way or dosn't haafe the right code.

i've been looking into combing bigreds editor loading tut?anay one tried this? ineed help with it Tongue

ps, i'nm ubery drunk!

hmm I checked the code for it and its right.

in Double Click code...

Code:
For D = 1 To MAX_INV

in other parts of the code its 0 to MAX_INV - 1

I tried changing to that but then I get subscript out of range.

GSD, help dammit! This code needs to be rewritten.


- Tony - 06-01-2007

Just go through elysium source and rip it T.T


- Matt - 06-01-2007

This tut works fine. I used it and have no problems.

And ripping things from ES isn't the solution to everything Pando.


- Xlithan - 06-01-2007

ES has a lot of bugs with it's features, not to mention there's been a hell of alot of code changes which makes many things incompatible with MS code anymore.


- halla - 06-01-2007

Advocate Wrote:This tut works fine. I used it and have no problems.

And ripping things from ES isn't the solution to everything Pando.

Weird. I went through and im pretty sure I have everything the same as the tut here.


- Tony - 06-01-2007

Blitting to the screen is much funner and challenging. I think its faster rather than blitting to countless picture boxes.

[Image: Love.png]




- halla - 06-01-2007

ok but this has no relevance to the question I asked.


- halla - 06-01-2007

Only differences I see... ok I had to dim E as long in the one sub cause it wasnt in this code.

Also I have 3.0.7 so theres a frmInvetory. I removed that.

' Call SendUseItem(frmInventory.lstInv.ListIndex + 1)
Call SendUseItem(lstInv.ListIndex + 1)

Since there is a lstInv in frmMirage it shouldnt matter. Thats about all I changed. I just went through and all the codes right.


- GodSentDeath - 06-01-2007

Sonire Wrote:GSD, help dammit! This code needs to be rewritten.
lol I remember saying I would re-write this like a year ago... Sadly I haven't gotten around to it and probably won't =P

I can't really help with your problem halla, just MAKE SURE you go through EVERY step and do them PROPERLY =P


- halla - 06-01-2007

oh I did I can even check again... did you originally write this for 3.0.3? If so it shouldnt matter im using 3.0.7

Its something when you use an item or double click it makes all the pictures go away.

Also the label use item it wont let me click it some reason... I can only use an item by double clicking it.


- Krloz - 11-02-2007

[quote="Kuja"]Blitting to the screen is much funner and challenging. I think its faster rather than blitting to countless picture boxes.

[Image: Love.png]




- Robin - 11-02-2007

Erm. Kuja might still have my little guide in his inbox.


- Tony - 15-02-2007

[quote="Krloz"][quote="Kuja"]Blitting to the screen is much funner and challenging. I think its faster rather than blitting to countless picture boxes.

[Image: Love.png]




- Krloz - 16-02-2007

I know I dont deserve it =P . I haven't had time to work on this becoz of rl things with my girl xD


- Tony - 16-02-2007

Krloz Wrote:I know I dont deserve it =P . I haven't had time to work on this becoz of rl things with my girl xD

I didn't mean it. Just try fox out and then tell me if you get problems and I'll help. YAMEAN


- Robin - 16-02-2007

Group Hug! only explains how to lock the DC, which is all that you needed to get the blted inventory working.

Krloz is gonna need the sub which loops through the inventory blting the items, the alphablending code (Fox) and also the lock DC.

I think.


- Tony - 17-02-2007

Kite Wrote:Group Hug! only explains how to lock the DC, which is all that you needed to get the blted inventory working.

Krloz is gonna need the sub which loops through the inventory blting the items, the alphablending code (Fox) and also the lock DC.

I think.

That was pretty easy but my days with vb6 is OVER. Until I return haha.


- Da Undead - 30-04-2007

ok im havng an error :
Quote:Method or data member not found
Highlights:
Code:
.Picture =

Line:
Code:
picInv2.Picture = LoadPicture()

Sub:
Code:
Private Sub PicInv_Click(Index As Integer)
Dim D As Long
Dim e As Long
For D = 0 To MAX_INV - 1
On Error Resume Next
If Index = D Then
    lstInv.Selected(D) = True
    If Item(GetPlayerInvItemNum(MyIndex, lstInv.SelCount + D + e)).Name = "" Then
        picInv2.Picture = LoadPicture()
        IName.Caption = ""
    Else
        If Item(GetPlayerInvItemNum(MyIndex, D + 1)).Type = ITEM_TYPE_CURRENCY Then
            IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, D + 1)).Name) & " (" & GetPlayerInvItemValue(MyIndex, D + 1) & ")"
            Call BitBlt(picInv2.hdc, 0, 0, PIC_X, PIC_Y, picItems.hdc, 0, Item(GetPlayerInvItemNum(MyIndex, D + 1)).Pic * PIC_Y, SRCCOPY)
        Else
                ' Check if this item is being worn
            If GetPlayerWeaponSlot(MyIndex) = D + 1 Or GetPlayerArmorSlot(MyIndex) = D + 1 Or GetPlayerHelmetSlot(MyIndex) = D + 1 Or GetPlayerShieldSlot(MyIndex) = D + 1 Then
                IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, D + 1)).Name) & " (worn)"
                Call BitBlt(picInv2.hdc, 0, 0, PIC_X, PIC_Y, picItems.hdc, 0, Item(GetPlayerInvItemNum(MyIndex, D + 1)).Pic * PIC_Y, SRCCOPY)
            Else
                IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, D + 1)).Name)
                Call BitBlt(picInv2.hdc, 0, 0, PIC_X, PIC_Y, picItems.hdc, 0, Item(GetPlayerInvItemNum(MyIndex, D + 1)).Pic * PIC_Y, SRCCOPY)
            End If
        End If
    End If
End If
Next D
End Sub



- Da Undead - 30-04-2007

Fixed it, i just like deleted it and then created it again. Now im getting an "Method or data member not found"

for .hdc

in

Code:
Call BitBlt(picInv2.hdc, 0, 0, PIC_X, PIC_Y, picItems.hdc, 0, Item(GetPlayerInvItemNum(MyIndex, D + 1)).Pic * PIC_Y, SRCCOPY)



- Styre - 30-04-2007

After putting this code in my Source I have an Error at:

Code:
Function GetPlayerInvItemNum(ByVal Index As Long, ByVal InvSlot As Long) As Long
    GetPlayerInvItemNum = Player(Index).Inv(InvSlot).Num
End Function

Highlights:
Code:
GetPlayerInvItemNum = Player(Index).Inv(InvSlot).Num

Error:

Code:
rte 9: Subscript our of range

this is when i click the button to open my Inventory


- Matt - 30-04-2007

Do you have a higher or lower max_inv compared to the amount of pic boxes you put? If your max_inv is say, 50, and you only put 24 boxes, that would cause a problem.

I think..


- Styre - 30-04-2007

That isn't causing it, although I had 50 inv slots and 24 boxes. I made 50 boxes and it's still ginving the same error