View Single Post
  #33  
Old 04-27-2009, 03:38 AM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
Quote:
Originally Posted by Tigairius View Post
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
Adding the offset as in showing the NPC -1? Or adding +1 to all movements and detections?
__________________
*Don't let the door hit you on the way out.*
Reply With Quote