Mirage Source http://www.miragesource.net/forums/ |
|
Genders http://www.miragesource.net/forums/viewtopic.php?f=201&t=664 |
Page 1 of 1 |
Author: | Shadow Dragon [ Fri Oct 20, 2006 3:10 pm ] |
Post subject: | Genders |
Hi, I'm trying to update my engine with genders, I have done everything I know of to update it, but it still tells me "Runtime error"13" Type MisMatch" Then it highlights This > Code: Class(i).MaleSprite = GetVar(FileName, "CLASS", "MaleSprite")
|
Author: | William [ Fri Oct 20, 2006 3:22 pm ] |
Post subject: | |
1. Make sure there actually is a value that the getvar command is trying to grab. 2. Does FileName has a dir? 3. Male/Female aint in MSE right? That means you might have done something wrong with this line: Code: Class(i).MaleSprite
|
Author: | Obsidian [ Sat Oct 21, 2006 3:43 am ] |
Post subject: | |
try to use binary instead of INIs, it'll get rid of the majority of the rte13's... but the problem is that either the INI file is incorrect like will said (e.g., the file isn't in the correct today, the path is incorrect to the file, or the header is incorrect, etc.) |
Author: | Lea [ Sat Oct 21, 2006 6:05 pm ] |
Post subject: | |
Code: Class(i).MaleSprite = Val(GetVar(FileName, "CLASS", "MaleSprite"))
|
Author: | Shadow Dragon [ Mon Oct 23, 2006 12:03 pm ] |
Post subject: | |
I know this will probably sound stupid, but I put the Male and FemaleSprite every where it is stated and still I get a error, now it's runtime error9 sub script out of range, and it highlights Code: Class(i).MAGI = Val(Parse(n + 7)) any clues?
|
Author: | DarkX [ Mon Oct 23, 2006 1:13 pm ] |
Post subject: | |
Hey guys, I finally got around to installing this myself, and it doesn't work with 32*64, any clues on how to fix this? edit--- By the way when I say it doesn't work,(as well as 32*64) is that neither of them make the second class right. If you pick female it blits you as a 32*32, and it doesn't blit the second sprite, it just blits the feet section of the females/second classes. |
Author: | Dark Echo [ Tue Oct 24, 2006 2:40 am ] |
Post subject: | |
DarkX, there must be something wrong with your 32x64 code.. Check your bltplayer sub.. When it blts the female side, it saids that the female sprite is 32pixels understand the male sprite.. Just change that to 64.. |
Author: | Nexarcon [ Tue Oct 24, 2006 3:12 am ] |
Post subject: | |
Or you may be selecting the wrong sprite number |
Author: | DarkX [ Thu Oct 26, 2006 2:34 am ] |
Post subject: | |
Ok, here is my BltPlayer Sub, and there is nothing about blting the female side(that I'm aware of, and there was nothing about changing it in the tutorial I used) Code: Public Sub BltPlayer(ByVal Index As Long) Would I have to make a variable that checks for the other gender?
'**************************************************************** '* WHEN WHO WHAT '* ---- --- ---- '* 07/12/2005 Shannara Optimized function. '**************************************************************** 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 With Player(Index) If .AttackTimer + 1000 < GetTickCount Then .Attacking = 0 .AttackTimer = 0 End If End With With rec .top = GetPlayerSprite(Index) * PIC_Y .Bottom = .top + PIC_Y .Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X .Right = .Left + PIC_X End With 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 With rec .top = .top + (y * -1) End With End If Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Sub |
Author: | Dr. Spoon [ Thu Oct 26, 2006 11:04 pm ] |
Post subject: | |
this is almost too easy.. Code: Class(i).MaleSprite = GetVar(FileName, "CLASS", "MaleSprite") should be Code: Class(i).MaleSprite = GetVar(FileName, "CLASS" & i, "MaleSprite")
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |