Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about sprites
#1
This is newbish but can someone point me in the right direction; I want it so npc's and players have different sprite sheets.
Reply
#2
its simple actually. Create a new surface, copy and paste the sprite surface make it DD_NPCSurf or something then go to bltnpcand change it to DD_NPCSurf.

Public DD_NPCSurf As DirectDrawSurface7
Public DDSD_NPC As DDSURFACEDESC2

Code:
' Init npc sprite ddsd type and load the bitmap
    DDSD_NPC.lFlags = DDSD_CAPS
    DDSD_NPC.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_SYSTEMMEMORY
    Set DD_NPCSurf = DD.CreateSurfaceFromFile(App.Path & "\npcs.bmp", DDSD_Sprite)
    DD_NPCSurf.SetColorKey DDCKEY_SRCBLT, key

Then got to bltnpc and find whatever you can find of dd_spritesurf and change it to dd_npcsurf. simple.
Reply
#3
Yeah if you need help IM me
Reply
#4
Why would he need help if I were to just give him the code on a platter? Simple enough and if you don't understand....
Reply
#5
Nothing wrong with being nice. It goes a long way.
Reply
#6
He's right, and besides pando... there's an error in the code you posted. Can you spot it? Smile

(it never hurts to be helpful)
Reply
#7
"\npcs.bmp", DDSD_Sprite) I left this error for him just to get better. This is how some people taught me. Its a nice way to learn.
Reply
#8
lol yeah i got it working. And yeah i noticed that error while adding it. Thanks for the help guys
Reply
#9
You can also do this with paperdoll. Just make a new surface called equipmentsurf and change the itemsurf in bltplayer to equipment surf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)