Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-28-2011, 11:50 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
basically have a counter:

PHP Code:
function onPlayerenters()
{
  
settimer(0.05);
}

function 
onTimeout()
{
  if (
keydown2(keycode("f"),true) && this.speed<this.topspeed)this.speed++;
  else 
this.speed-=0.25;
  
settimer(0.05);

I dont think I've used valid syntax for keydown2 but I can't remember what works and what not o_0, hopefully this will give you an idea on how to do it. But you could always post your script then one of us can examine it and tell you what the problem is lol , its most likely that you not having the script take a break after the key is pressed. So pop into your script
PHP Code:
sleep (0.05); 
after your speed increment statement
Reply With Quote
Reply


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:44 AM.


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