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
  #1  
Old 12-07-2002, 11:03 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
keypressed :(

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.
__________________
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 07:55 PM.


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