R
Rosieu
Guest
Hi Everyone!
I was wondering if there was a way to handle/find the x,y coordinates of a character at a given location in a string?
To give it some context, I'm currently adapting Heartbeast's dialogue tutorial to my own uses and I was wondering if there is a way I could basically tell my game to draw a sprite at a location, based on the location of a character in a string.
Say for example, the index of the character was "count" (which it is at this time thanks to Heartbeast's tutorial), is there a way I could say something like:
draw_sprite(spr_example,0,(string_char_at(message,count).x +10),(string_char_at(message,count).y))?
So that the game would draw the sprite at the location of the character at point 'count' in string 'message' (+ 10 pixels across).
Thanks in advance for everyone's help!
I was wondering if there was a way to handle/find the x,y coordinates of a character at a given location in a string?
To give it some context, I'm currently adapting Heartbeast's dialogue tutorial to my own uses and I was wondering if there is a way I could basically tell my game to draw a sprite at a location, based on the location of a character in a string.
Say for example, the index of the character was "count" (which it is at this time thanks to Heartbeast's tutorial), is there a way I could say something like:
draw_sprite(spr_example,0,(string_char_at(message,count).x +10),(string_char_at(message,count).y))?
So that the game would draw the sprite at the location of the character at point 'count' in string 'message' (+ 10 pixels across).
Thanks in advance for everyone's help!