Mirage Source
Sprite Selection - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Sprite Selection (/showthread.php?tid=575)



Sprite Selection - Tony - 03-01-2007

Sprite Selection
This was done %100 by Pando

You get to select any sprite of your desire at New Character.
This is just a simple modification, a little bittle this and a little bit of that :wink:
  • First lets setup our controls - frmNewChar

    picSpriteLoader - AutoRedraw AutoResize Visible False
    lblDown with caption of ""
    txtSprite with text of "0" Visible False
    picSprite
    tmrSprite Interval 1

In lblDown (code) add

(For 32x64 Sprites, CHALLENGE! - Change to 32x32)
Code:
Dim Cap As Integer

    Cap = txtSprite.Text
    If txtSprite.Text = "2" Then
        txtSprite.Text = "0"
    ElseIf txtSprite.Text = "0" Then
    
    Else
    txtSprite.Text = Cap - 2
     End If

In lblUp (Code you f'in noob [b]


- Gawian - 22-03-2007

Sorry if I'm necro-posting but I was wondering what would have to be done to make this code so for both male and female you could set 4 different sprites for each


- Tony - 22-03-2007

Create 8 pic boxes, and when the user clicks on the box make txtSprite.text = that sprite number..

Fairly simple..\


- Robin - 22-03-2007

Dave Wrote:Because adding 8 of VB's heaviest control is always the solution.

Sarcastic bastard!

Kuja, you shouldn't really do it like this. Loading up the DX Surfaces a bit earlier would be an idea, then simply bitblt from those.

Ps. I love your avatar, Dave.


- Gawian - 23-03-2007

Thanks for the info Smile