| Mirage Source http://www.miragesource.net/forums/ |
|
| help http://www.miragesource.net/forums/viewtopic.php?f=201&t=3006 |
Page 1 of 3 |
| Author: | Xeph [ Fri Nov 09, 2007 2:03 pm ] |
| Post subject: | help |
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 |
|
| Author: | Matt [ Fri Nov 09, 2007 2:15 pm ] |
| Post subject: | Re: help |
Code tags. How can it be shorter than that, yet longer than that at the exact same time..? |
|
| Author: | Xeph [ Fri Nov 09, 2007 2:36 pm ] |
| Post subject: | Re: help |
what is a code tag |
|
| Author: | William [ Fri Nov 09, 2007 2:54 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Xeph [ Fri Nov 09, 2007 2:56 pm ] |
| Post subject: | Re: help |
ill try that thanks heres where i got it http://www.key2heaven.net/ms/BackupCode/Temporary_Archive/PaperDoll.html edit: nope |
|
| Author: | Matt [ Fri Nov 09, 2007 3:16 pm ] |
| Post subject: | Re: help |
Quote: [code][/code] Those are code tags. |
|
| Author: | Xeph [ Fri Nov 09, 2007 3:24 pm ] |
| Post subject: | Re: help |
oh i thought you were talking about VB6 |
|
| Author: | William [ Fri Nov 09, 2007 3:30 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Xeph [ Fri Nov 09, 2007 4:20 pm ] |
| Post subject: | Re: help |
i tried that already it doesent work |
|
| Author: | Matt [ Fri Nov 09, 2007 4:29 pm ] |
| Post subject: | Re: help |
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? |
|
| Author: | Xeph [ Fri Nov 09, 2007 4:37 pm ] |
| Post subject: | Re: help |
well kinda but when i copy paste it into VB6 it turns out like the one in my first post |
|
| Author: | Matt [ Fri Nov 09, 2007 4:59 pm ] |
| Post subject: | Re: help |
Explain. I don't exactly get it.. |
|
| Author: | William [ Fri Nov 09, 2007 7:25 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Matt [ Fri Nov 09, 2007 7:32 pm ] |
| Post subject: | Re: help |
The one I posted, SHOULD paste into VB properly.. IF not, I have no idea what's wrong with your shit.. |
|
| Author: | William [ Fri Nov 09, 2007 7:58 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Matt [ Fri Nov 09, 2007 8:06 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Lea [ Fri Nov 09, 2007 8:44 pm ] |
| Post subject: | Re: help |
It's strange tat his computer doesn't follow the line breaks and such. What OS? |
|
| Author: | William [ Fri Nov 09, 2007 9:17 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Matt [ Fri Nov 09, 2007 11:12 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | William [ Fri Nov 09, 2007 11:40 pm ] |
| Post subject: | Re: help |
Ohh, it worked for me too -_-. Although I think I had the problem before |
|
| Author: | Matt [ Fri Nov 09, 2007 11:46 pm ] |
| Post subject: | Re: help |
Before Robin fixed all of that, yeah, that was an issue. |
|
| Author: | William [ Fri Nov 09, 2007 11:49 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Rezeyu [ Fri Nov 09, 2007 11:53 pm ] |
| Post subject: | Re: help |
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. |
|
| Author: | Xeph [ Sat Nov 10, 2007 4:24 am ] |
| Post subject: | Re: help |
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 |
|
| Author: | Lea [ Sat Nov 10, 2007 7:32 am ] |
| Post subject: | Re: help |
Well then type it by hand - like you should anyways. |
|
| Page 1 of 3 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|