Mystic Software Forums

Miscellaneous => Archives => Archive => Topic started by: DarkElite on December 15, 2003, 08:47:22 AM

Title: (no subject)
Post by: DarkElite on December 15, 2003, 08:47:22 AM
im making this card game....and there is a card selection window, but when i try to set the image of the selected card next to the window...it will come out blank...heres a portion of my program...

Code: [Select]
#SetImage("/cards/CardSelectionWindow.bmp",75,10,200,400)
#ty!=ty!+3
#If (dragonC!>=1)
{
#Text(10,ty!,"Dragon <dragonC!>")
#sltnum!=sltnum!+1
#ty!=ty!+1
#slot<sltnum!>$=Dragon
}
#CImage1$="/cards/"+slot1$+".bmp"
#SetImage(CImage1$,300,25,80,96)
#WaitPress()

when it comes to #CImage1$="/cards/"+slot1$+".bmp"
and #SetImage(CImage1$,300,25,80,96) it starts having problems setting....anyone got any help?
Title: (no subject)
Post by: Cesque on December 15, 2003, 09:22:01 AM
As usually, I don't get exactly what you mean. Very Happy

But, hmm... To junction commands and apply them, use things like

#hmm1$ = "#" "<hmm!>" + "! = 1"
#rpgcode(hmm1$)
Title: (no subject)
Post by: DarkElite on December 15, 2003, 03:31:53 PM
lol, this is what im doing...

increasing ty! by one (this is the y for text)
increasing sltnum! by 1 (this will be set into slot ex. Slot<sltnum!>$)
set the slot to Dragon (or other card...) (ex. #Slot<sltnum!>$=Dragon)

try to set the image after puting the slot crap and other in Cimage1$
ex.
#CImage1$="/cards/"+Slot1$+".bmp"
#SetImage(CImage1$,300,25,80,96)

but you see, when i do this...it will put up a black image instead of the card... get it now? so whats  wrong?
Title: (no subject)
Post by: Cesque on December 15, 2003, 03:37:55 PM
I don't know exactly. Easiest way is to use the easiest way to check:

#mwincls
#mwin("CImage1$")
#wait
#mwincls

If the appearing text doesn't look like what you want, toolkit mis-read the file you're looking for.

I'm also not sure if toolkit knows what's "/folder_name/"... Try putting image into default folder and see if it works.
Title: (no subject)
Post by: DarkElite on December 15, 2003, 08:02:28 PM
it works to put it into another folder....but it still doesnt work..and it wont turn in the correct lit value.. heres the whole method (sofar)..

Code: [Select]
#Method CardSelector()
{
#SetImage("/cards/CardSelectionWindow.bmp",75,10,200,400)
#ty!=ty!+3
#sltnum!=1
***SETS CARD TEXT***
#If (dragonC!>=1)
{
#Text(10,ty!,"Dragon <dragonC!>")
#ty!=ty!+1
#slot<sltnum!>$=Dragon
#sltnum!=sltnum!+1
}
#If (snakeC!>=1)
{
#Text(10,ty!,"Snake  <snakeC!>")
#ty!=ty!+1
#slot<sltnum!>$=Snake
#sltnum!=sltnum!+1
}
#If (helmC!>=1)
{
#Text(10,ty!,"Helm   <helmC!>")
#ty!=ty!+1
#slot<sltnum!>$=Helm
#sltnum!=sltnum!+1
}

#CImage1$="/cards/"+slot<1>$+".bmp"
#SetImage(CImage1$,300,25,80,96)
#WaitPress()
}

**just say that #dragonC!=1 and #snakeC!=2**
Title: (no subject)
Post by: DarkElite on December 15, 2003, 08:08:24 PM
ohhh!!! i see what i was doing wrong!!  Laughing  i looked a past name selection (cutomized) and it had to add var[varnums] 1-14...and whenn you have a variable in a variable u dont u < and >... you use [ and ]!!
Title: (no subject)
Post by: Cesque on December 16, 2003, 09:32:21 AM
See? Wink
Title: (no subject)
Post by: Dont_Think_So on January 06, 2004, 11:22:39 PM
hehe, I see your problem... I'll just rewrite the code for you:P

Code: [Select]
#Method CardSelector()
{
#SetImage("/cards/CardSelectionWindow.bmp",75,10,200,400)
#ty!=ty!+3
#sltnum!=1
***SETS CARD TEXT***
#If (dragonC!>=1)
{
#Text(10,ty!,"Dragon <dragonC!>")
#ty!=ty!+1
#slot[sltnum!]$=Dragon
#sltnum!=sltnum!+1
}
#If (snakeC!>=1)
{
#Text(10,ty!,"Snake  <snakeC!>")
#ty!=ty!+1
#slot[sltnum!]$=Snake
#sltnum!=sltnum!+1
}
#If (helmC!>=1)
{
#Text(10,ty!,"Helm   <helmC!>")
#ty!=ty!+1
#slot[sltnum!]$=Helm
#sltnum!=sltnum!+1
}

#CImage1$="/cards/"+slot[1]$+".bmp"
#SetImage(CImage1$,300,25,80,96)
#WaitPress()
}

Havent tested, but I assume it works...