Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

String Character Assignment Problem

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Sun Dec 04, 2005 5:07 pm    Post subject: String Character Assignment Problem Reply with quote

I am having difficulty figuring out how to assign certain characters to strings.

Here is the situation; I have several characters belonging the the internal font that I want to have appended to a string (the string functions as a context-sensitive mouse pointer). I know the commands that appends numbers and ascii characters to strings, but what about the non-ascii, internal characters?

I could just use the normal string assignment commands ($31="D") to do this, but I would like to have all of the character references be contained in constants in order to maintain central control. Besides, the characters I want to use are non-letters and non-numbers unique to the internal font -- they don't correspond to ascii characters at all.

Any advice or alternatives?
Back to top
View user's profile Send private message
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Sun Dec 04, 2005 5:56 pm    Post subject: Reply with quote

Actually, all the characters are ASCII characters.

If you go into the font editor, and select a character, you'll see "ASCII 123" or whatever, depending on the code. Then, take that number and plug it into an append ascii command:

Code:
append ascii(1,200) #append character #200 to $1


And, it gets better.

If you want to embed such a character in a literal string ($1="ABC"), you can use ALT codes to put it in a text file. For example, in the default font, #136 is a sword. To put the equivalent character in anything other than the OHR, hold down alt, and press 0136 (on the numeric pad, not the numbers above the letters), and ASCII #136 will be inserted:

Code:
$1="ˆMaster"


Just remember that it won't show up properly outside of the OHR.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Tue Dec 06, 2005 10:48 am    Post subject: Reply with quote

Ah, er, hm. Okay! That really helps me out.

Out of curiosity, if the OHR uses ASCII for its internal font as well, why does the scancode it use not function ASCII-ly? I guess I figured that the scancode stuff corresponded to the OHR's internal accounting system.
Back to top
View user's profile Send private message
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Tue Dec 06, 2005 10:59 am    Post subject: Reply with quote

No, scan codes represent the keyboard's internal accounting system. That's why there isn't a scan code for <sword>.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Tue Dec 06, 2005 3:55 pm    Post subject: Reply with quote

Ah; I didn't know that. Thank you.

Hmm...*shifty-eyed* I have ideas...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group