Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 04-27-2009, 02:51 AM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
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.
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.