need to cycle through letters in a text actor

Game Editor comments and discussion.

need to cycle through letters in a text actor

Postby feral » Sun Jun 08, 2008 12:53 am

sorry guys, but strings and chars are still a weak point of mine

i just need a quick bit of code that will cycle through each letter of the alphabet and place the new letter in the textactor each draw..

ie:
text actor shows A
then shows B
then shows C
but only one at a time..

preferably on a key down event to move to next char ( forward and reverse)


thanks in advance ( sorry not being lazy , just not good at chars yet)
feral
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score

Re: need to cycle through letters in a text actor

Postby catacomber » Mon Jun 09, 2008 3:56 am

I think the easiest way would be to use the Ascii characters--set your variable for the letter A to it's Ascii counterpart (&#065) and then set up a function to increment that by 1.
User avatar
catacomber
 
Posts: 195
Joined: Fri Sep 28, 2007 5:36 pm
Score: 10 Give a positive score

Re: need to cycle through letters in a text actor

Postby feral » Mon Jun 09, 2008 4:34 am

bah :( thanks anyway, but I nutted it out eventually - this thread can be closed

feral
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron