| Mirage Source http://miragesource.net/forums/ |
|
| Allrighty... zlol ZoSo noob at coding. http://miragesource.net/forums/viewtopic.php?f=201&t=3525 |
Page 1 of 1 |
| Author: | Mithlomion [ Tue Mar 25, 2008 10:21 pm ] |
| Post subject: | Allrighty... zlol ZoSo noob at coding. |
Allright.. http://elysiumsource.net/community/view ... perdoll+v5 Thats my best resource of ever having some kind of understanding.. and i still dont. Im working on the client part.. Allright what i need help is.. i need the help with the part in Sub Bltplayer.. I got no idea how to make it blt the item graphic over the player. You see my system is suppose to work like this : You got one line of item graphics as usuall.. and it blts the graphic next to the item graphic as the paperdoll.. My game has no animations or directions so.. its one item graphic and one graphic for the paperdoll. I guess i need to do just +32 of the item graphic.. but i dont know coding at all.. if anyone could give me a hint .. a hint i can understand or atleast give me an example.. i might get an better understanding of how stuff works. I wanted to have a different Item Sheet system.. but im to noobzors for that so yeah... anyone wanna be kind and code this feature for me be my guest >_>.. |
|
| Author: | William [ Wed Mar 26, 2008 4:36 pm ] |
| Post subject: | Re: Allrighty... zlol ZoSo noob at coding. |
Well, this tutorial is for 32*64 sprites paperdoll. And since you only have 1 frame you can basicly delete this part: Code: Dim AttackSpeed As Long If GetPlayerWeaponSlot(Index) > 0 Then AttackSpeed = Item(Player(Index).WeaponNum).AttackSpeed Else AttackSpeed = 1000 End If ' Only used if ever want to switch to blt rather then bltfast ' I suggest you don't use, because custom sizes won't work any longer With rec_pos .Top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (SIZE_Y - PIC_Y) .Bottom = .Top + PIC_Y .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + ((SIZE_X - PIC_X) / 2) .Right = .Left + PIC_X + ((SIZE_X - PIC_X) / 2) End With ' Check for animation Anim = 0 If Player(Index).Attacking = 0 Then Select Case GetPlayerDir(Index) Case DIR_UP If (Player(Index).YOffset > PIC_Y / 2) Then Anim = 1 Case DIR_DOWN If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1 Case DIR_LEFT If (Player(Index).XOffset > PIC_Y / 2) Then Anim = 1 Case DIR_RIGHT If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1 End Select Else If Player(Index).AttackTimer + Int(AttackSpeed / 2) > GetTickCount Then Anim = 2 End If End If ' Check to see if we want to stop making him attack If Player(Index).AttackTimer + AttackSpeed < GetTickCount Then Player(Index).Attacking = 0 Player(Index).AttackTimer = 0 End If Cuase you dont have attackspeed in a uniteded MS, and you dont use blt, and you dont have animations and you dont care if the player attacks cause you dont use that frame. You cant use this part: Code: x = GetPlayerX(Index) * PIC_X - (SIZE_X - PIC_X) / 2 + sx + Player(Index).XOffset y = GetPlayerY(Index) * PIC_Y - (SIZE_Y - PIC_Y) + sx + Player(Index).YOffset + (SIZE_Y - PIC_Y) Cause ES uses constants thats not in MS, unless you move them. And also this wont work unless you use their scrolling. At least from what I can tell. The rec for the items, should be something like this: Code: rec.left=Item(Player(Index).WeaponNum).PicX rec.right = rec.left + 32 ' you need to add a picX, cause .Pic is the Y value. rec.top = Item(Player(Index).WeaponNum).Pic rec.Bottom = rec.Top + 32 This is just what I trhew together quickly, Im kinda tired and hate writing long posts that will end up complicated and messy anyway. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|