I got 45 textures I want to cycle on a line (TID 191). Since I named them "GIFA1000" to "GIFA1044", I thought of a loop like this:
str file1 = "GIFA";
int file2 = 1000;
str file = file1 + file2; // <--- THIS DOES NOT WORK
while (TRUE) {
if (file2 < 1045) {
SetLineTexture(191, SIDE_FRONT, TEXTURE_TOP, file);
file2 += 1;
file = file1 + file2; // <--- THIS DOES NOT WORK
} else {file2 = 1000;}
}
...but in ACS, there seems to be no explicit way of converting a number into a string.
I found a forum with a collection of string functions, but these only included the opposite of what I need (string to integer instead of integer to string).
So, is there a way? The funny thing is that print(s:file1, d:file2) gives the exact output of what I need, but I cannot get it into a string variable.
Question
vedan
Hi,
I got 45 textures I want to cycle on a line (TID 191). Since I named them "GIFA1000" to "GIFA1044", I thought of a loop like this:
str file1 = "GIFA"; int file2 = 1000; str file = file1 + file2; // <--- THIS DOES NOT WORK while (TRUE) { if (file2 < 1045) { SetLineTexture(191, SIDE_FRONT, TEXTURE_TOP, file); file2 += 1; file = file1 + file2; // <--- THIS DOES NOT WORK } else {file2 = 1000;} }
...but in ACS, there seems to be no explicit way of converting a number into a string.
I found a forum with a collection of string functions, but these only included the opposite of what I need (string to integer instead of integer to string).
So, is there a way? The funny thing is that print(s:file1, d:file2) gives the exact output of what I need, but I cannot get it into a string variable.
Bye!
Edited by vedanShare this post
Link to post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.