I've been doing a lot of work offline with GS1 since I haven't had a stable internet connection for the past week, and I am trying to do something like:
PHP Code:
if (keydown(C)){
ShowCharPane();
}
And it's not working.
I have tried keydown, keydown2, and keypressed in as many ways as I could imagine, and none of them worked. The only thing I could get is (keypressed) to respond, but it responds on EVERY key and when I try to specify with #k, #K etc, it doesn't work. I even tried stuff like:
PHP Code:
if (keypressed)
if (strequals(#K,C)){
ShowCharPane();
}
}
I am not really sure if there is just some strange graal wierdness going on with assigning custom keys.. It doesn't seem like it should be THIS hard...
ALSO;
I have an NPC with setshape 1,32,32; and I would like to somehow make the script read it's x,y in the CENTER of the NPC, not the top left corner, but I am not sure the easiest way how. I tried something like:
this.npcx = x+1;
and then using the new vars for the movement like:
x = this.npcx += .03;
While this SEEMS to make sense to me, it doesn't work, which is causing silly graphical errors with my onwall detection, so the mob is being blocked by the tree, it's image is being drawn on top of the tree, mmm, I could just show the image at x,y -1, but it would have to be looped in everytime, which seems like a silly thing to do since we are already moving the whole NPC too?
Very confused.
