key down

Game Editor comments and discussion.

key down

Postby frodo » Sat Jul 01, 2006 11:06 pm

I have an animation of the alphabet in sign language, and I want do be able to press any letter on the keyboard and the animpos with the letter that I pressed to come up. for instance, If I press "a" on the keyboard I want the right sign to come up.
I could do this by doing a key down event on all the keys, and type the right animpos in the script area, but I'd be 70 years old by the time I got done with that :mrgreen:.
would I use "getlastkey"? :?: :?: :?: :?:
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby pavel329 » Sun Jul 02, 2006 3:16 pm

well you could just clone all of them as many times as you want then change there transparency.you would still have to use key down but not script.only change transperency.i know wat ur talking about.
Drugs r bad.
Mgaay?

Image
User avatar
pavel329
 
Posts: 269
Joined: Thu May 25, 2006 2:05 pm
Location: Behind you
Score: 5 Give a positive score

Postby Game A Gogo » Sun Jul 02, 2006 4:27 pm

or just set the visibely state to dont draw but allow events and on key down change it to enable.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby frodo » Tue Jul 04, 2006 3:27 pm

I don't think you guys understand. I want to have a key down with any key, and then in script editor specify which key.
I think someone posted something like this before, but I can't find it.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby Kodo » Tue Jul 04, 2006 4:57 pm

You talking about Remapping keys?
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Postby Novice » Tue Jul 04, 2006 8:59 pm

I think the easiest way would be to use getLastKey function and get the ASCII number of each key pressed. And use a simple fuction like
Code: Select all
animpos=key+65;
in draw actor where key is a variable where you sotred the getLastKey and +65 or something is to jump over all the signs in the ASCII table and to get to A.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron