reverse function.

here is a reverse function I made.
put this in global code and add it:
here is the new one,
all you must do is add it into the global code.
on the draw actor event you use,
change the number to the right to change how fast the transition is.
the higher the number, the slower it is.
it is a very simple function.
I am going to make a version that types it out slowly some time.

put this in global code and add it:
here is the new one,
- Code: Select all
char smpl[255];
void sample(char s[255])
{
strcpy(smpl, s);
}
void printsample(char s[255])
{
strcpy(s, smpl);
}
void reverse(char s[255], int spd)
{
int c, i, j;
int wait;
sample(s);
wait -= 1;
if(wait <= 0) {
for(i = 0, j = strlen(smpl)-1; i < j; i++, j--) {
c = smpl[i];
smpl[i] = smpl[j];
smpl[j] = c;
}
wait = spd;
printsample(s);
}
}
all you must do is add it into the global code.
on the draw actor event you use,
- Code: Select all
reverse(text, 30);
change the number to the right to change how fast the transition is.
the higher the number, the slower it is.

it is a very simple function.

I am going to make a version that types it out slowly some time.
