• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

is there a way to reverse string_copy?

I

itameio

Guest
I used a program to make game maker studio render Arabic by reversing the letters and other stuff (it only uses fonts in the project) and i still wanted to draw the text letter by letter by using string_copy function, problem is, now the text renders from last word to first word as in This example.

This is because, I presume, the text is reversed, but I need a way to make it render letter by letter from first to last, is there anyway to reverse the direction of this function or another function to do this at all?.
 

obscene

Member
1 string_length();
2 string_char_at();
3 string_insert();

Too lazy to work up an example for you but you can use those functions to find out how long the string is to build a for loop. Cycle through the string at get the character at each position starting at 1. Then do another loop to insert the characters in reverse order.

Just figure it out one step at a time.
 
I

itameio

Guest
1 string_length();
2 string_char_at();
3 string_insert();

Too lazy to work up an example for you but you can use those functions to find out how long the string is to build a for loop. Cycle through the string at get the character at each position starting at 1. Then do another loop to insert the characters in reverse order.

Just figure it out one step at a time.
already found a solution for it which was to wrap the function directly around the string, anyway, i had to remove my code from the draw event because it slowed the game down and realized the String_copy() function cannot work if called from a variable.

more details in my second post here
 
Top