View Single Post
  #1  
Old 04-27-2009, 03:19 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Well, in GS1, for the keypressed thing, use :
PHP Code:
if (keypressed) {
   if (
strequals(#p(1),C)){
      
ShowCharPane();
   }

You could also do:
PHP Code:
if (keydown2(keycode(c), true)) { 
Like in a timeout or in the keypressed event.

to replicate these in gs2, do:

PHP Code:
function onKeyPressed(codekey) {
  switch (
key) {
    case 
"C":
      
ShowCharPane();
    break;
  }

or
PHP Code:
if (keydown2(getKeyCode("C"), true)) { 
As far as finding the center of the npc, you will always have to add the offset of +1 if the width/height is 32
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote