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 07-02-2002, 01:51 AM
faiola faiola is offline
Registered User
Join Date: Jun 2002
Posts: 27
faiola is on a distinguished road
Send a message via AIM to faiola
Talking some help plz?

argh again i ask for help

grrr..:grrr: :grrr: :grrr:

// NPC made by X.Draco.X

if (playertouchsme) {
hide;
abovehead();
showimg 304,i_mpbottle.gif,playerx,playery-1;
playermp+=25;
sleep 4;
show;
}

function abovehead() {
for (i=0;i<100;i++) {
showimg 304,i_mpbottle.gif,playerx,playery-1;
sleep .01;
}
}


why don't this one work?
i said many times b-4 that i am a bad scripter and i say it again....

all i want it to do is show it above the persons head for like 3 seconds then dissappear and regenerate .......

this is why i'm a lat not a nat....:grrr: :grrr: :grrr: :grrr:
__________________
Reply With Quote
  #2  
Old 07-02-2002, 02:02 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
first of all you CANNOT have a sleep or timeout under .05, graal CANNOT go faster than 20 fps (frames per second)
second - if you want to hide an image, use hideimg <index>
third - why are you using a for loop for this? look into timeout loops
Reply With Quote
  #3  
Old 07-02-2002, 02:20 AM
faiola faiola is offline
Registered User
Join Date: Jun 2002
Posts: 27
faiola is on a distinguished road
Send a message via AIM to faiola
well jeez somone's cranky
i know how to use timeout loops but i didn't know if that will work online under this case
and it works as timeout = .01;
__________________

Last edited by Python523; 07-02-2002 at 03:10 AM..
Reply With Quote
  #4  
Old 07-02-2002, 02:31 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
.01 cant work as a timeout because graal doesnt run that fast why wont you believe me
Reply With Quote
  #5  
Old 07-02-2002, 08:17 AM
IAMNOTAFREAK IAMNOTAFREAK is offline
Registered User
Join Date: May 2002
Location: IBM Stellar Sphere
Posts: 118
IAMNOTAFREAK is on a distinguished road
Send a message via ICQ to IAMNOTAFREAK Send a message via AIM to IAMNOTAFREAK
Quote:
Originally posted by Python523
.01 cant work as a timeout because graal doesnt run that fast why wont you believe me
he's right, you know...

anyway, easiest way i do something like that is use showimg under a timeout, use a simple counter every timeout, then after the amount of time you want cancel the timeout and use hideimg...
something like

if (blah){
timeout=.05;
}
if (timeout){
this.show++;
if (this.show<60){showimg 1,blah,x,y;timeout=.05;}
if (this.show=>60){hideimg 1;}
}

something like that...
__________________
Crimson


Nocturne...it's coming.
Reply With Quote
  #6  
Old 07-02-2002, 08:31 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
timeout=0.1;
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #7  
Old 07-02-2002, 08:47 AM
draygin draygin is offline
Telmont Bandit
draygin's Avatar
Join Date: Feb 2002
Location: Ohio
Posts: 2,550
draygin is on a distinguished road
Quote:
Originally posted by Python523
.01 cant work as a timeout because graal doesnt run that fast why wont you believe me
I've used time out .1 for doors and it worked fine for me online and offline. =\
__________________

I stole Spanky's gold!
Reply With Quote
  #8  
Old 07-02-2002, 09:32 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 draygin


I've used time out .1 for doors and it worked fine for me online and offline. =\
0.1 and 0.01 is A LOT different
Reply With Quote
  #9  
Old 07-02-2002, 10:33 AM
draygin draygin is offline
Telmont Bandit
draygin's Avatar
Join Date: Feb 2002
Location: Ohio
Posts: 2,550
draygin is on a distinguished road
Quote:
Originally posted by Python523

0.1 and 0.01 is A LOT different
ahhh I missed that part. *ambles of whistling*
__________________

I stole Spanky's gold!
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 08:57 AM.


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