Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Character File issues -_-
#1
Whee! First Post ^^;;

Ok so, my head developer hands me the source, and I open it, start learning things... ok going well so far. First Assignment: Separate Male/ Female Sheets for custom characters. Alright, load up modHandledata to find this:
Quote:If FileExists("GFX\Heads.bmp") Then
frmNewChar.iconn(0).Picture = LoadPicture(App.Path & "\GFX\Heads.bmp")
End If
If FileExists("GFX\Bodys.bmp") Then
frmNewChar.iconn(1).Picture = LoadPicture(App.Path & "\GFX\Bodys.bmp")
End If
If FileExists("GFX\Legs.bmp") Then
frmNewChar.iconn(2).Picture = LoadPicture(App.Path & "\GFX\Legs.bmp")
End If

k, so I see that he is using Option(Radio) buttons for this and accodingly I rewrite the code to:

Quote:if frmNewChar.optMale.value = true then
If FileExists("GFX\MaleHeads.bmp") Then
frmNewChar.iconn(0).Picture = LoadPicture(App.Path & "\GFX\MaleHeads.bmp")
End If
If FileExists("GFX\MaleBodys.bmp") Then
frmNewChar.iconn(1).Picture = LoadPicture(App.Path & "\GFX\MaleBodys.bmp")
End If
If FileExists("GFX\MaleLegs.bmp") Then
frmNewChar.iconn(2).Picture = LoadPicture(App.Path & "\GFX\MaleLegs.bmp")
End If
else
if frmNewChar.optFemale.value = true then
If FileExists("GFX\FemaleHeads.bmp") Then
frmNewChar.iconn(0).Picture = LoadPicture(App.Path & "\GFX\FemaleHeads.bmp")
End If
If FileExists("GFX\FemaleBodys.bmp") Then
frmNewChar.iconn(1).Picture = LoadPicture(App.Path & "\GFX\FemaleBodys.bmp")
End If
If FileExists("GFX\FemaleLegs.bmp") Then
frmNewChar.iconn(2).Picture = LoadPicture(App.Path & "\GFX\FemaleLegs.bmp")
End If
end if
End if

Great! Looks good... But wait, it only loads only the Male or only the Female sets at any given time, it won't let me use the radio and gender buttons to my advantage. HELP!
Reply
#2
Try removing the optFemale.value = True part. Radio buttons are supposed to work in the way that only one can be true at any given time on the same frame, so if male is true then load the male, else, just load everything else.

It saves two lines if nothing else. I don't know if it'll work out the way you want it, to be honest.
Reply
#3
Well I edited out those 2 lines, and it still loaded only the Male set (Heads,Bodies,Legs). Also, the data was never transfered. It still used the stock heads, etc. Its like the picture was changed, but beyond that, nothing happened, the originals are still in place. (That's bad, btw.)


This whole if file exists statement means this is the only section of the code the engine/build is looking for that particular file, correct?

I'll be a bit more cognitive after some sleep. Thanks for putting up with my over-tired frustrated self ^^
Reply
#4
Please use code tags and not quote tags.
Reply
#5
Is this Mirage or Eclipse?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#6
Why would someone from Eclipse post their code here when Eclipse has their own forum :?
Reply
#7
Many people have done it in the past. People from Elysium do it too.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#8
Well I guess if they fail to get help at their forum it's not a bad thing to attempt to get help elsewhere.
Reply
#9
Amazingly, somone at eclipse suggested a fix: searching the entire code for the bmp files. It works now.

I'm really beginning to hate the eclipse forums, but I like 2.7 a lot, so I'm just going to come here from now on because you all are geared toward source editing, and that's what I'm focusing on right now.
DFA, you were right, and I wish I hadn't seen it, though 2.6 was not much of an update. But I digress. The people at eclipse are pompous assholes when you really want to start learning how to use the engine properly and change the source to your liking. Thanks for the help and expect me to be posting a lot more here soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)