Mystic Software Forums
Mystic Software => General Discussion => Topic started by: Dude Man on January 16, 2005, 07:16:27 AM
-
Okay, I'm working on my awsome custom menu for DMD RPG and a few buttons don't work! The return button and the exit button don't work and none of the text shows up. It's probally just something really obivious that I forgot, but I can't find out what's wrong. Sorry, if this pisses of anybody... -_-
(note this isn't the complete program, and this is in TK3)
#Bold("on")
#FontSize(14)
#Bitmap("backteal.gif")*this sets the background
*main buttons
#SetButton("new.gif", 1, 2, 2, 22, 32)
#SetButton("save.gif", 2, 24, 2, 22, 32)
#SetButton("load.gif", 3, 46, 2, 22, 32)
#SetButton("help.gif", 4, 68, 2, 22, 32)
#SetButton("setup.gif", 5, 90, 2, 22, 32)
#SetButton("return.gif", 6, 112, 2, 22, 32)
#SetButton("exit.gif", 7, 134, 2, 22, 32)
*other buttons
#SetButton("status.gif", 7!, 178, 2, 22, 32)
#SetButton("item.gif", 8!, 200, 2, 22, 32)
#SetButton("equip.gif", 9!, 222, 2, 22, 32)
#SetButton("tech.gif", 10!, 244, 2, 22, 32)
#gethp(playerhandle[0]$,onehp!)
#getmaxhp(playerhandle[0]$,onemaxhp!)
#getfp(playerhandle[0]$,onefp!)
#getsmp(playerhandle[0]$,onemp!)
#getmaxsmp(playerhandle[0]$,onemaxmp!)
#getlevel(playerhandle[0]$,onelevel!)
#getdp(playerhandle[0]$,onedp!)
#text(40,40,"<playerhandle[0]$> Level: <onelevel!>")
#text(40,45,"<onehp!>HP/<onemaxhp!>HP")
#text(40,50,"<onemp!>MP/<onemaxmp!>MP")
#text(20,55,"<onefp!>FP <onedp!>DP")
#If(playerHandle[1]$~= "")
{
#gethp(playerhandle[1]$,twohp!)
#getmaxhp(playerhandle[1]$,twomaxhp!)
#getfp(playerhandle[1]$,twofp!)
#getsmp(playerhandle[1]$,twomp!)
#getmaxsmp(playerhandle[1]$,twomaxmp!)
#getlevel(playerhandle[1]$,twolevel!)
#getdp(playerhandle[1]$,twodp!)
#text(110,40,"<playerhandle[1]$> Level: <twolevel!>")
#text(110,45,"<twohp!>HP/<twomaxhp!>HP")
#text(110,50,"<twomp!>MP/<twomaxmp!>MP")
#text(110,55,"<twofp!>FP <twodp!>DP")
}
#If (playerHandle[2]$~= "")
{
#gethp(playerhandle[2]$,threehp!)
#getmaxhp(playerhandle[2]$,threemaxhp!)
#getfp(playerhandle[2]$,threefp!)
#getsmp(playerhandle[2]$,threemp!)
#getmaxsmp(playerhandle[2]$,threemaxmp!)
#getlevel(playerhandle[2]$,threelevel!)
#getdp(playerhandle[2]$,threedp!)
#text(180,40,"<playerhandle[2]$> Level: <threelevel!>")
#text(180,45,"<threehp!>HP/<threemaxhp!>HP")
#text(180,50,"<threemp!>MP/<threemaxmp!>MP")
#text(180,55,"<threefp!>FP <threedp!>DP")
}
#If (playerHandle[3]$~= "")
{
#gethp(playerhandle[3]$,fourhp!)
#getmaxhp(playerhandle[3]$,fourmaxhp!)
#getfp(playerhandle[3]$,fourfp!)
#getsmp(playerhandle[3]$,fourmp!)
#getmaxsmp(playerhandle[3]$,fourmaxmp!)
#getlevel(playerhandle[3]$,fourlevel!)
#getdp(playerhandle[3]$,fourdp!)
#text(250,40,"<playerhandle[3]$> Level: <fourlevel!>")
#text(250,45,"<fourhp!>HP/<fourmaxhp!>HP")
#text(250,50,"<fourmp!>MP/<fourmaxmp!>MP")
#text(250,55,"<fourfp!>FP <fourdp!>DP")
}
#If (playerHandle[4]$~= "")
{
#gethp(playerhandle[4]$,fivehp!)
#getmaxhp(playerhandle[4]$,fivemaxhp!)
#getfp(playerhandle[4]$,fivefp!)
#getsmp(playerhandle[4]$,fivemp!)
#getmaxsmp(playerhandle[4]$,fivemaxmp!)
#getlevel(playerhandle[4]$,fivelevel!)
#getdp(playerhandle[4]$,fivedp!)
#text(320,40,"<playerhandle[4]$> Level: <fivelevel!>")
#text(320,45,"<fivehp!>HP/<fivemaxhp!>HP")
#text(320,50,"<fivemp!>MP/<fivemaxmp!>MP")
#text(320,55,"<fivefp!>FP <fivedp!>DP")
}
#Done!=0
#while(done!==0)
{
#mouseclick(x!,y!)
#checkbutton(x!,y!,button!)
#if(button!==0)
{
*none
}
#if(button!==1)
{
*new game
#reset
}
#if(button!==2)
{
*save game
#Mwincls
#dirsav(dest$)
#Mwincls
#if(dest$~="CANCEL")
{
#save(dest$)
#done!=1
#end
}
}
#if(button!==3)
{
*load game
*'load game' clicked
#dirsav(dest$)
#if(dest$~="CANCEL")
{
#load(dest$)
#done!=1
#end
}
#if(button!==4)
{
*help
}
#if(button!==5)
{
*setup
}
#If(button!==6)
{
*return
#ClearButtons()
#done!=1
}
#if(button!==7)
{
*exit
#dos()
}
}
So yeah, what did I do wrong?
-
Sorry, but I don't think I can be of any use this time,
but I am looking forward to seeing it done!
-
Yeah, that's fine. Xorlak is usally the person to answer these.
-
*Flees before the is in the great Xorlak's presence!
-
I don't use buttons, I use cursors. I have no idea how buttons even work Razz
-
At a glance, it looks correct. I'll try pasting it into my TK3 and seeing what happens (I'll admit I haven't played with TK3 programs that much!)
-
You don't need the "#"s, you silly people Wink
Also, Dude Man, the comment is "//", unlike '*', it's not prone to errors. The result of using '*' now, is undefined, for the following reason:
function() * x
Will execute:
function()->operator*(x)
From that point, if that's not what you meant, all hell may well break loose.
If it's any consolation, it executes properly for me.
-
Some of us will probably stick with using #'s because of habit. IMO it makes things easier to read as well.
-
You mean you can still use #s in TK3?
Okay, I am so going to try out TK3 after I'm done with
The Blade of Champion!
The thing is, I'm not sure if you can make full screen games
with it.
EDIT: I tried running this program in TK3, and you're right,
it definenly needs improvment, because it didn't open squat!
-
Probally because there is alot of different things you have to do in TK3.
So, KSN, your saying if I change * into // it should work?
-
I tried running this program in TK3, and you're right,
it definenly needs improvment, because it didn't open squat!
Probably because you don't have the images that the buttons references, hence providing you with a blank screen.
-
Ahhh...good point. lol