
04-27-2009, 03:38 AM
|
|
the Professional.
|
 |
Join Date: Sep 2003
Location: Zormite
Posts: 964
|
|
Quote:
Originally Posted by Tigairius
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(code, key) {
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.*
|
|
|
|