View Single Post
  #1  
Old 05-31-2006, 08:17 AM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
ARG GS2 doesnt like me

Why the heck wont function onKeyPressed() { } work for me?

NPC Code:
function onKeyPressed(character)
{
if (character == "a") {
if (playerx in |this.x-2,this.x+3|&&playery in |this.y-4,this.y+3|) {
if (this.open==0) {
play("nextpage.wav");
this.open=1;
this.setx=0;
}
}
}
}



NPC Code:
function onKeypressed(character)
{
if (character == "z") {
setani("sit","");
}
if (character == "x") {
setani("grab","");
}
}



(2 Different NPCs)

Neither of them work. What the heck am I doing wrong?
__________________



Reply With Quote