View previous topic :: View next topic |
Author |
Message |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Sun Dec 04, 2005 5:07 pm Post subject: String Character Assignment Problem |
|
|
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 |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sun Dec 04, 2005 5:56 pm Post subject: |
|
|
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:
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 |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Tue Dec 06, 2005 10:48 am Post subject: |
|
|
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 |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Dec 06, 2005 10:59 am Post subject: |
|
|
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 |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Tue Dec 06, 2005 3:55 pm Post subject: |
|
|
Ah; I didn't know that. Thank you.
Hmm...*shifty-eyed* I have ideas... |
|
Back to top |
|
 |
|