GML [1.4.999] Preventing # from going next line

volky

Member
I am trying to prevent hash character from going next line. I have already tried
GML:
string_pos(ord("#"), message)
,
GML:
keyboard_check_pressed(ord("#"))
, and
GML:
string_pos(ord("\n"), message)
, but apparently they do not work. How can I check if # key is pressed? Or is it not possible at all?
 

woods

Member
put a backslash in front of it..




If you need to actually draw the "#" symbol as part of the text, you can precede it using the "\" symbol like this:
str = "this will draw the \# symbol";
 

volky

Member
I actually forgot to say that this is a text field to get input from the user. I need to precede # as soon as the user presses it. However, apparently GM directly parses it as a new line before letting me do some work on it.
 

woods

Member
ahh.. sry ive barely scratched the surface of text fields.. i think this one is above me.

I need to precede # as soon as the user presses it
can you use.. keyboard_lastchar; ..in the step event to continually check for # ?
 
Top