Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
32*64 NPC's Full Tut
#1
Tutorial by: DarkX
Code tested on: MSE

Ok I was looking over all the things that were missing on that version that William posted, which I guess was made by Sign, not really sure, but I wanted people to have the whole idea before they add it, here's my version of the tutorial.

Ok this is all client side, let's start with this:
Code:
' Blit out the npcs
        For i = 1 To MAX_MAP_NPCS
             Call BltNpc(i)
        Next i
It should be duplicated, (copy it and paste it right beneath the first one)
It should look like this:
Code:
' Blit out the npcs top
        For i = 1 To MAX_MAP_NPCS
             Call BltNpcTop(i)
        Next i
Next we should move along to find " Public sub BltNPC(Byvl MapNpcNum as long) "
copy the entire sub. Then paste it below the first one and rename it, " Public sub BltNpcTop(byval MapNpcNum as long) "

In bltNpcTop; replace This:
Code:
' Check if its out of bounds because of the offset
    If y < 0 Then
        y = 0
        With rec
             .top = .top + (y * -1)
        End With
    End If
With this:
Code:
' Check if its out of bounds because of the offset
    y = y - 32
    If y < 0 And y > -32 Then
        With rec
              .top = .top - y
              y = 0
        End With
    End If
Tim to move along; let's work on the rest go into sub BltNpc; and replace This:
Code:
With rec
        .top = Npc(MapNpc(MapNpcNum).Num).Sprite * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (MapNpc(MapNpcNum).Dir * 3 + Anim) * PIC_X
        .Right = .Left + PIC_X
    End With
With This:
Code:
With rec
        .top = Npc(MapNpc(MapNpcNum).Num).Sprite * PIC_Y + PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (MapNpc(MapNpcNum).Dir * 3 + Anim) * PIC_X
        .Right = .Left + PIC_X
    End With
Keep it moving theres more to see, go into BltNpcTop and replace This
Code:
With rec
        .top = Npc(MapNpc(MapNpcNum).Num).Sprite * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (MapNpc(MapNpcNum).Dir * 3 + Anim) * PIC_X
        .Right = .Left + PIC_X
    End With
With this:
Code:
With rec
        .top = Npc(MapNpc(MapNpcNum).Num).Sprite * PIC_Y * 2
        .Bottom = .top + PIC_Y
        .Left = (MapNpc(MapNpcNum).Dir * 3 + Anim) * PIC_X
        .Right = .Left + PIC_X
    End With

Now that's still not all of it.
Go into sub BltMapNpcName and replace This:
Code:
TextY = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - CLng(PIC_Y / 2) - 4
With this:
Code:
TextY = MapNpc(Index).Y * PIC_Y + MapNpc(Index).YOffset - 50 '(or-4 -  pic_y - pic_y/2)
Again Still not all of it; there's a little more be patient. Ok go into frmNpcEditor and click picSprite
Make it's width 480
And it's height 960
And finally the LAST part.
In modGameLogic find Sub NPCEditorBltSprite
Once you've found it, replace the whole sub with this:
Code:
Public Sub NpcEditorBltSprite()
    Call BitBlt(frmNpcEditor.picSprite.hdc, 0, 0, PIC_X, PIC_Y * 2, frmNpcEditor.picSprites.hdc, 3 * PIC_X, frmNpcEditor.scrlSprite.Value * PIC_Y * 2, SRCCOPY)
End Sub

Or just put this: *2 :After every PIC_Y.

And that's the complete tutorial; have fun with it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)