26-03-2008, 04:36 PM
Well, this tutorial is for 32*64 sprites paperdoll. And since you only have 1 frame you can basicly delete this part:
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:
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:
This is just what I trhew together quickly, Im kinda tired and hate writing long posts that will end up complicated and messy anyway.
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
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)
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.