Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 5:43 am

All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: help
PostPosted: Fri Nov 09, 2007 2:03 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
help whenever i try the paper doll code
when replacing the first one ut comes
up like this

Code:
Sub BltPlayer(ByVal Index As Long)Dim Anim As ByteDim x As Long, y As Long    ' Only used if ever want to switch to blt rather then bltfast    With rec_pos        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset        .Bottom = .top + PIC_Y        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset        .Right = .Left + PIC_X    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 + 500 > GetTickCount Then              Anim = 2        End If    End If        ' Check t
o see if we want to stop making him attack    If Player(Index).AttackTimer + 1000 < GetTickCount Then        Player(Index).Attacking = 0        Player(Index).AttackTimer = 0    End If        rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X    rec.Right = rec.Left + PIC_X        x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4        ' Check if its out of bounds because of the offset    If y < 0 Then        y = 0        rec.top = rec.top + (y * -1)    End If        If GetPlayerDir(Index) = DIR_UP Then        If Player(Index).Shield > 0 Then              rec.top = Item(Player(Index).Shield).Pic * PIC_Y              rec.Bottom = rec.top + PIC_Y              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)        End If        If Player(Index).Weapon > 0 Then              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y              rec.Bottom = rec.top + PIC_Y              Call DD_BackBuffer.BltFast(x
, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)        End If    End If        rec.top = GetPlayerSprite(Index) * PIC_Y    rec.Bottom = rec.top + PIC_Y            'Call DD_BackBuffer.Blt(rec_pos, DD_SpriteSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)        If Player(Index).Armor > 0 Then        rec.top = Item(Player(Index).Armor).Pic * PIC_Y        rec.Bottom = rec.top + PIC_Y        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)    End If    If Player(Index).Helmet > 0 Then        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y        rec.Bottom = rec.top + PIC_Y        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)    End If    If GetPlayerDir(Index) <> DIR_UP Then        If Player(Index).Shield > 0 Then              rec.top = Item(Player(Index).Shield).Pic * PIC_Y              rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)        End If        If Player(Index).Weapon > 0 Then              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y              rec.Bottom = rec.top + PIC_Y              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)        End If    End IfEnd Sub




except shorter... and wider


Last edited by Xeph on Fri Nov 09, 2007 2:33 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 2:15 pm 
Code tags.

How can it be shorter than that, yet longer than that at the exact same time..?


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 2:36 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
what is a code tag


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 2:54 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
I added code tags, but that doesn't help. Where did you copy that code from?

Try to copy the code from the tutorial into notepad first, and then paste it into visual basic.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 2:56 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
ill try that thanks heres where i got it

http://www.key2heaven.net/ms/BackupCode/Temporary_Archive/PaperDoll.html

edit: nope


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 3:16 pm 
Quote:
[code][/code]


Those are code tags.


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 3:24 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
oh i thought you were talking about VB6


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 3:30 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Xeph wrote:
ill try that thanks heres where i got it

http://www.key2heaven.net/ms/BackupCode/Temporary_Archive/PaperDoll.html

edit: nope

Yeah, you need to paste it into notepad first, then it will work.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 4:20 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
i tried that already it doesent work


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 4:29 pm 
Code:
Sub BltPlayer(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    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 + 500 > GetTickCount Then
              Anim = 2
        End If
    End If

    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + 1000 < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If

    rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
    rec.Right = rec.Left + PIC_X

    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4

    ' Check if its out of bounds because of the offset
    If y < 0 Then
        y = 0
        rec.top = rec.top + (y * -1)
    End If

    If GetPlayerDir(Index) = DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If

    rec.top = GetPlayerSprite(Index) * PIC_Y
    rec.Bottom = rec.top + PIC_Y

    'Call DD_BackBuffer.Blt(rec_pos, DD_SpriteSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

    If Player(Index).Armor > 0 Then
        rec.top = Item(Player(Index).Armor).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If

    If Player(Index).Helmet > 0 Then
        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If

    If GetPlayerDir(Index) <> DIR_UP Then
        If Player(Index).Shield > 0 Then
            rec.top = Item(Player(Index).Shield).Pic * PIC_Y
            rec.Bottom = rec.top + PIC_Y
            Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
            rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
            rec.Bottom = rec.top + PIC_Y
            Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub


Is that what you needed done?


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 4:37 pm 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
well kinda but when i copy paste it into VB6 it turns out like the one
in my first post


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 4:59 pm 
Explain. I don't exactly get it..


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 7:25 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Xeph wrote:
well kinda but when i copy paste it into VB6 it turns out like the one
in my first post

I told you to copy it from the tutorial, PASTE it into notepad, then copy it from notepad and paste it into VB.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 7:32 pm 
The one I posted, SHOULD paste into VB properly..

IF not, I have no idea what's wrong with your shit..


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 7:58 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Perfekt wrote:
The one I posted, SHOULD paste into VB properly..

IF not, I have no idea what's wrong with your [edit]..

Yeah the one you posted will work great. Just that he didn't listen to me that he needs to paste it into notepad before vb when grabbing code from that site.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 8:06 pm 
William wrote:
Perfekt wrote:
The one I posted, SHOULD paste into VB properly..

IF not, I have no idea what's wrong with your [edit]..

Yeah the one you posted will work great. Just that he didn't listen to me that he needs to paste it into notepad before vb when grabbing code from that site.


I just took what he posted and properly nested it all.. Easy peasy.


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 8:44 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
It's strange tat his computer doesn't follow the line breaks and such.

What OS?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 9:17 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Dave wrote:
It's strange tat his computer doesn't follow the line breaks and such.

What OS?

Have you tried grabing code rom that site the tut is on.. Same things happens to me I think.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 11:12 pm 
William wrote:
Dave wrote:
It's strange tat his computer doesn't follow the line breaks and such.

What OS?

Have you tried grabing code rom that site the tut is on.. Same things happens to me I think.


/shrugs

Works fine for me.


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 11:40 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Ohh, it worked for me too -_-. Although I think I had the problem before :roll:

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 11:46 pm 
Before Robin fixed all of that, yeah, that was an issue.


Top
  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 11:49 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Perfekt wrote:
Before Robin fixed all of that, yeah, that was an issue.

Ah, so thats it. Well I guess Xeph got it working now.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Fri Nov 09, 2007 11:53 pm 
Offline
Pro
User avatar

Joined: Thu Dec 14, 2006 3:20 am
Posts: 495
Location: California
Google Talk: Rezeyu@Gmail.com
My XP computer wouldn't word wrap it either.

My vista wont either from William's backup, but it will from th ones I downloaded from robin when they first were released.


Dunno why.


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Sat Nov 10, 2007 4:24 am 
Offline
Regular

Joined: Fri Oct 19, 2007 2:38 am
Posts: 39
William wrote:
Perfekt wrote:
The one I posted, SHOULD paste into VB properly..

IF not, I have no idea what's wrong with your [edit]..

Yeah the one you posted will work great. Just that he didn't listen to me that he needs to paste it into notepad before vb when grabbing code from that site.


thats not true i tried it

William wrote:
Perfekt wrote:
Before Robin fixed all of that, yeah, that was an issue.

Ah, so thats it. Well I guess Xeph got it working now.


nope not working


Top
 Profile  
 
 Post subject: Re: help
PostPosted: Sat Nov 10, 2007 7:32 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Well then type it by hand - like you should anyways.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group