Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-14-2003, 12:10 AM
Chicken_l33t Chicken_l33t is offline
Banned
Join Date: Sep 2002
Location: NewZealand
Posts: 467
Chicken_l33t is on a distinguished road
You could set a this.var to 0
then a timeout = 0.05;

then basicly if (timeout)
{
this.var++;
if (playertouchsme)
{
if (this.var <= 30){//Give prize stuff here;}
else {say2 Haha, you lucked out;}
}
timeout = 1;
}

So basicly all that would do is set a timeout to increase and the variable will increase with the timeout (timeout is gonna go up every 1 second) then if the player touchs the NPC while it's bellow 30seconds they get the prize (Obviously I didn't add the prize in becasue I dunno what it is) and if that didn't reach it in the 30seconds it says "Haha, you lucked out".

I dunno if that's posting a full script cause it probally doesnt work I just skimmed through it to show you an outline.
Reply With Quote
 

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 02:06 PM.


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