Mystic Software Forums
Miscellaneous => Archives => Archive => Topic started by: Anonymous on February 21, 2004, 05:24:59 PM
-
Hey all. Here's my problem. I have two characters who have two names in their handles, as in "Joe Smith" rather than just "Joe." Normally, in turns of calling up their character portraits and such, this isn't a problem. I just name the profile image "Joe Smith.bmp" and it pops right up.
However, I'm having a problem with calling up their stats. For example, in code like this:
#PixelText(125,namey!,"<playerhandle[num!]$> <myjob[num!]$>")
...where myjob$ is supplied by this code:
#setstatlit("Joe Smith","Job","Worker")
#getstatlit("Joe Smith","Job",myjob$)
...the Toolkit apparently gets confused by the space in Joe Smith's name.
Obviously, I could just rename Joe Smith as plain old Joe, but I don't want to do that.
My question is, does anybody know of a way around this? For example, would it be possible for the actual handle of the character to be Joe, but have his name always appear as Joe Smith on menus, etc? I've seen code where people use "+" to tack stuff on, like:
#portrait[num!]$==playerhandle[num!]$+PNG$
...but I'm not sure how I would go about doing this for only the two of my eight total characters.
Any help is greatly appreciated (as is all of the help I've gotten already!).
DM
-
Well I think I know what to do here.
Have his name Just be Joe. Then at the begining of the game in the start program do this:
#Joe[name]$= Joe Smith
If you do that then in the RPG code editor you can just use Joe but in the game his name will display as Joe Smith!
-
yeah, that'll do it.
-
I had this problem because my classes include those such as Red Mage. I just named the class Red_Mage. It works fine.
-
Got it to work. Thank you yet again, guys!
DM
-
Wait a sec... It only appeared to be working because I had forgotten to change a few things.
Well, I changed all of my character's stuff to just "Joe," and then used this code in my start.prg:
#Joe[name]$="Joe Smith"
Unfortunately, it is not changing his name on the main menu or status screen. Am I missing something somewhere...?
DM
-
Make sure that in character section, variable which is Joe's name is Joe[name]$...
Or maybe it doesn't work on status screen and menu. Dunno.
-
Well theres another way to do it...you can just have no space in it...but what dude man said should work...#Joe[name]$="Joe Smith"...unless...did you make sure to make everything with "Joe Smith" in it is changed to "Joe"?
Then if that doesnt work, you cna just do JoeSmith or like Spydey and do Joe_Smith...well thats about all I can do Laughing
-
My question is, does anybody know of a way around this? For example, would it be possible for the actual handle of the character to be Joe, but have his name always appear as Joe Smith on menus, etc?
I would set up a special display name variable for all the characters. Name him "Joe" for all Toolkit purposes. When you add him to your party, set this variable:
#Display_Name[Joe]$="Joe Smith"
Now access this variable in your menu (assuming you have a custom one) like this:
* where i! = character slot number
#name$=playerHandle[i!]$
#displayname$=Display_Name[name$]$
#text(x!,y!,displayname$)
With this method, you'll have to set up a display name variable for all your characters, even if they don't have spaces in their name.
Or, you could always do the underscore suggestion and just use a Toolkit font and erase the underscore character (heh...)
-
I'm afraid I'm still not having any success with this.
Following Xoralx's advice, I put code like this just after each event where a character is added (with the main character's code being in start.prg):
#Display_Name[Joe]$="Joe Smith"
I put this near the beginning of my menu program, where the display settings are:
#name$=playerhandle[num!]$
#displayname$=Display_Name[name$]$
Here is the original code that controls how the character's name is printed on the main menu screen (This is the only place on screen where the name appears):
#PixelText(125,namey!,"<playerhandle[num!]$>")
I changed it to this:
#PixelText(125,namey!,"<displayname[num!]$>")
When I run this, the character name comes up blank. Being a total newbie, I assume that I've made a simple mistake somwhere. If anyone can show me where, I'll really appreciate it. This is starting to drive me bonkers. :blink:
DM
-
You need to do this all together, where you want to put the name on the screen:
#name$=playerhandle[num!]$
#displayname$=Display_Name[name$]$
#PixelText(125,namey!,"<displayname$>")
-
*smacks forehead*
Ah, yes! Thank you, it works perfectly!
Very Happy
DM
-
Good. Now I wish you the best of luck on your game and I hope your able to finish it! Most of my games a work on for about a week and then get bored and stop. Here's a list of game wich may or may not ever be finished
Bronze
Quest of Gram
Blade Cutter
Gun Blazer
Hamlet
Maelstorm
Shock Trigger
Center Earth
The Gate of Hope
Sad It a shame really...it's a shame....*sniff*
DON'T LET IT HAPPEN TO YOU! WORK ON YOUR GAMES 1 or 2 at a time...or umm...Just don't let it happen to you!
-
Ha! Don't worry. The game I'm working on has been in my head since 1996 or so. Sure, there were periods of time when I didn't think much about it, but it's always been there, wishing it had some way of getting out. Now that I've found the Toolkit, my game idea is very happy, and not willing to leave me alone until it is successfully ported into an actual game. So, I suspect I'll be chipping away at it for some time.
And thank you for the well-wishes. Right back at ya!
DM
-
I haven't finished - or abandoned - lots of games. Here are titles, heh...
Jerod's Quest
Song of Azrael
Elliot the Jew
-
Elliot the Jew? Was your game set in the real-life world?
If so, I find that interesting, because so is mine. (There is a healthy dose of a fantasy thrown in, but I don't have people throwing fireballs out of their hands or anything like that.)
And the title is intriguing either way. Care to tell what that game was going to be about?
DM
-
Nah, it was about a rabbi living in about VIII century BC, who ran from Jerusalem with a band of pirates after he got accused for blasphemy after calling archpriest a "big nose", then suddenly God spoke to him and ordered him to head north across the sea. Heh. Sort of comedy game I wanted to make.
My current game is SORT OF real. It's in alternative time, in late XIX century.
-
interesting, i liked that thing that was once in your signature that was about about the Song of Azael..or what ever, it was really good!!
-
I wrote Song of Azrael as a story 3 years ago... Then I decided it would be good to make a game based on it (sort of... I wanted to enhance the world described in further chapters but without death of main hero, like in the first part).
You can see the story here (http://http://mg.geahost.com/forums/viewtopic.php?t=132)...
But it's propably the worst of all chapters (there were 5 and only 2 survived - "Journey/Song of Azrael" and "Rock of God")
-
Main Charactor dieing eh? Not much games have that.