I
itameio
Guest
I think this deserves it's own post so here goes :
TL;DR:I want to use string_copy in adjust_arabic_text but i can't use it in the draw event because it makes the game slower and can't call it from a variable because string_copy wouldn't work.
I have downloaded this extension which makes game maker supports Arabic language, and it only has 1 function which is adjust_arabic_text("Arabic text here") which basically makes Arabic display correctly. so since i'm creating a visual novel, I need to have some text effects such as the dialogue being drawn letter by letter, for which I use String_copy function in the draw event.
So the problem with using these two functions together is that one of them needs to be in the other, if i put adjust_arabic_text() in the string_copy() function, the text is drawn from last letter to first (because in order for Arabic to be displayed correctly on game maker, it needs to be reversed, and thus this happens), an effect which I don't desire to use.
but that is fixed by putting the string_copy() function in the adjust_arabic_text() function, which displays the text correctly and draws it letter by letter from first to last.
after that another problem surfaced, since I use that code in the draw event, the adjust_arabic_text() was being executed every step of the game, which greatly slowed the game down on android, so I decided to have the text adjusted at the beginning of the game by assigning it to variables and using them in the draw_event later (the extension creator suggested this later too) but that didn't work the problem was that the "Count" element of the string_copy() function was not being increased as i intended it to (i use a variable in a step event to increase it and it worked when the code was in the draw event) so the text was not appearing at all since the count starts at 0.
so i had to remove the string_copy from the variable code, left only adjust_arabic_text() with the string to adjust, and put string_copy(myvariable . . in the draw event, which replicated the first problem of the text being drawn from last to first.
so my idea of fixing it was to include the string_copy() again in the variable by using functions such as string_replace and string_insert and that did not work too . . .
and now i'm stuck, i need a way about this, i want to use string_copy in adjust_arabic_text but i can't use it in the draw event because it makes the game slower and can't call it from a variable because string_copy wouldn't work.
TL;DR:I want to use string_copy in adjust_arabic_text but i can't use it in the draw event because it makes the game slower and can't call it from a variable because string_copy wouldn't work.
I have downloaded this extension which makes game maker supports Arabic language, and it only has 1 function which is adjust_arabic_text("Arabic text here") which basically makes Arabic display correctly. so since i'm creating a visual novel, I need to have some text effects such as the dialogue being drawn letter by letter, for which I use String_copy function in the draw event.
So the problem with using these two functions together is that one of them needs to be in the other, if i put adjust_arabic_text() in the string_copy() function, the text is drawn from last letter to first (because in order for Arabic to be displayed correctly on game maker, it needs to be reversed, and thus this happens), an effect which I don't desire to use.
but that is fixed by putting the string_copy() function in the adjust_arabic_text() function, which displays the text correctly and draws it letter by letter from first to last.
after that another problem surfaced, since I use that code in the draw event, the adjust_arabic_text() was being executed every step of the game, which greatly slowed the game down on android, so I decided to have the text adjusted at the beginning of the game by assigning it to variables and using them in the draw_event later (the extension creator suggested this later too) but that didn't work the problem was that the "Count" element of the string_copy() function was not being increased as i intended it to (i use a variable in a step event to increase it and it worked when the code was in the draw event) so the text was not appearing at all since the count starts at 0.
so i had to remove the string_copy from the variable code, left only adjust_arabic_text() with the string to adjust, and put string_copy(myvariable . . in the draw event, which replicated the first problem of the text being drawn from last to first.
so my idea of fixing it was to include the string_copy() again in the variable by using functions such as string_replace and string_insert and that did not work too . . .
and now i'm stuck, i need a way about this, i want to use string_copy in adjust_arabic_text but i can't use it in the draw event because it makes the game slower and can't call it from a variable because string_copy wouldn't work.
Last edited by a moderator: