Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-24-2002, 03:46 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
Newbie Script to fix

I know that this will be the ultimate challenge for you! Who am I kidding? This weapon sort of cuts out at random times and I have to reactivate it, any idea why?

if (playerenters){toweapons Wall Hopper;}
if (weaponfired){

while (keydown(1)){
sleep 0.09;
playerx-=1;
}

while (keydown(0)){
sleep 0.09;
playery-=1;
}

while (keydown(2)){
sleep 0.09;
playery+=1;
}

while (keydown(3)){
sleep 0.09;
playerx+=1;
}
}

Any help would be appreciated.
Reply With Quote
  #2  
Old 07-24-2002, 04:16 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
i suggest using things like this.mode=0 / 1. 0 being off and 1 being on.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #3  
Old 07-24-2002, 04:20 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
Ah, I haven't got that far in the tutorial yet *blows dust off npcprogramming.doc*
Reply With Quote
  #4  
Old 07-24-2002, 04:30 AM
Dean Dean is offline
Banned
Join Date: Sep 2001
Location: United Kingdom
Posts: 351
Dean will become famous soon enough
Thanks, I'll try and decipher that now, I think I understand it
Reply With Quote
  #5  
Old 07-24-2002, 10:44 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
use timeout of .1 and this.mode of 1 while you want to test the keys
and have the keydowns in the timeout
__________________
[signature]insert here[/signature]
Reply With Quote
  #6  
Old 07-24-2002, 10:48 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by screen_name
use timeout of .1 and this.mode of 1 while you want to test the keys
and have the keydowns in the timeout
there isnt a lot of difference between .05 and .1 but if he can use .05 fine, why not use it? the script obviously isn't serversided
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:49 PM.


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