NPC Code:
if (created) {
i = random(0,1);
}
if (i<=1) {
showimg 0,@@c@G H W E X,screenwidth/2,screenheight/1-10;
changeimgvis 0,4;
timeout=2.05;
this.key1=false;
if (keypressed){
if (keydown2(keycode(g),true)){
this.key1=true;
}
}
if (keypressed){
if (keydown2(keycode(h),true)){
if (this.key1=true){
this.key2=true;
}
}
}
if (keypressed){
if (keydown2(keycode(w),true)){
if (this.key1=true&&this.key2=true){
this.key3=true;
}
}
}
if (keypressed){
if (keydown2(keycode(e),true)){
if (this.key1=true&&this.key2=true&&this.key3=true){
this.key4=true;
}
}
}
if (keypressed){
if (keydown2(keycode(x),true)){
if (this.key1=true&&this.key2=true&&this.key3=true&&t his.key4=true){
this.key5=true;
}
}
}
}
The problem is that keypressed isn't "working", also, I know that it's keypressed that isn't working, and not keycode thanks to the debugger

. So, either something is wrong with keypressed (Heh, yeah right) or I made a mistake (<----That is the correct reason). So, could someone tell me what my mistake was?
Oh, and yes, I am aware of my uneccessarily large if statements, and that this script is actually pointless.