Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Inventory (GSD)
#26
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.
Reply
#27
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!
Reply
#28
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.
Reply
#29
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.
Reply
#30
Just go through elysium source and rip it T.T
Reply
#31
This tut works fine. I used it and have no problems.

And ripping things from ES isn't the solution to everything Pando.
Reply
#32
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.
Reply
#33
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.
Reply
#34
Blitting to the screen is much funner and challenging. I think its faster rather than blitting to countless picture boxes.

[Image: Love.png]

Reply
#35
ok but this has no relevance to the question I asked.
Reply
#36
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.
Reply
#37
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
Reply
#38
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.
Reply
#39
[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]

Reply
#40
Erm. Kuja might still have my little guide in his inbox.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#41
[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]

Reply
#42
I know I dont deserve it =P . I haven't had time to work on this becoz of rl things with my girl xD
Reply
#43
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
Reply
#44
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#45
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.
Reply
#46
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
Reply
#47
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)
Reply
#48
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
Reply
#49
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..
Reply
#50
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)