Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Microsoft Windows

how to detect keyboard

Windows DX9/OpenGL 2 Standalone Apps

how to detect keyboard

Postby followshiva » 09 Aug 2011, 09:55

hi,
how to detect any click on keyboard?
if i catch the kKeyCode like "log.message ( kKeyCode )",
log message will display numeric(1,2,3...) not alphabet(A,B,C...)
or
may i transform numeric to alphabet like (0 > a, 1 > b)

thanks.
followshiva
Fresh Boarder
Fresh Boarder
 
Posts: 9

Re: how to detect keyboard

Postby RedQueen » 09 Aug 2011, 17:40

You have to have the game main script to send a message to the AIMODEL that you want to respond to a keydown event.

IE:
First you need the MAIN BRAIN that controls every script that will be in your program. As in the image the MAIN BRAIN is what process the keydown events and send it to the PLAYER_AI script like this.

Image

Image

Image

Hope that explains it clear and many apologizes for any typo was making this while chasing two little ones around the house.

But Shiva operates for example how our bodies operate we have our brain the send messages to each part of our body and that is what the main script in Shiva is for it is the brain and send all the necessary messages to where they need to be sent. Well that is how I understand it and it helped me get further with my study of programming for it.
RedQueen
Platinum Boarder
Platinum Boarder
 
Posts: 328


Return to Microsoft Windows