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-30-2001, 11:24 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
Whats wrong...

Whats wrong with this script the stars dont move?


if (created) {
this.stars=20;
this.s=1;
this.sfdef={26,56,20,2};
this.speed={1,1};
//
setarray this.star, this.stars*3;
for (this.s=0;this.s<this.stars;this.s++) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+
this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1
]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/1
0;
}
timeout = .05;
}
if (timeout) {
for (this.s=0;this.s<this.stars;this.s++) {
if (this.star[this.s*3+1]>this.sfdef[1]+this.sfdef[3]) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0
]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef
[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])
/10;
}
else this.star[this.s*3+1]+=this.star[this.s*3+2];
showimg this.s,kstar.gif,this.star[this.s*3],this.star[this.s*3+1];
}
timeout = .1;
}
__________________
Reply With Quote
  #2  
Old 07-30-2001, 12:01 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool what....

what is this not doing???
i dont feel like putting it into a npc..
and are you putting it in a npc server or not???
__________________
Thanks,
-KJL
Reply With Quote
  #3  
Old 07-30-2001, 01:50 PM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
*bump*
__________________
Reply With Quote
  #4  
Old 07-31-2001, 12:11 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
NPC Code:

if (created) {
this.stars=20;
this.s=1;
this.sfdef={26,56,20,2};
this.speed={1,1};
setarray this.star,this.stars*3;
for (this.s=0;this.s<this.stars;this.s++ {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/10;
}
timeout = 0.1;
}
if (timeout) {
for (this.s=0;this.s<this.stars;this.s++ {
if (this.star[this.s*3+1]>this.sfdef[1]+this.sfdef[3]) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/10;
}else {
this.star[this.s*3+1]+=this.star[this.s*3+2];
}
showimg this.s,kstar.gif,this.star[this.s*3],this.star[this.s*3+1];
}
timeout = 0.1;
}





There. You forgot the ; at the end of your for loops. hehehe
__________________

subliminal message: 1+1=3
Reply With Quote
  #5  
Old 07-31-2001, 12:53 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
LOL!!!!!!!
__________________
Do it with a DON!
Reply With Quote
  #6  
Old 07-31-2001, 01:09 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Quote:
Originally posted by zokemon
LOL!!!!!!!
stop spamming and jump off the earth.
Reply With Quote
  #7  
Old 07-31-2001, 07:36 AM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
Jadis:

You shouldn't need ;'s at the end of the for loop

for (hi=0;hi<1;hi++) setplayerprop #c,hi;
Reply With Quote
  #8  
Old 07-31-2001, 10:28 AM
ZORG1986 ZORG1986 is offline
Registered User
ZORG1986's Avatar
Join Date: Jul 2001
Location: England - Yes thats the small Island in Europe that Ownz you all.
Posts: 783
ZORG1986 is on a distinguished road
Send a message via ICQ to ZORG1986 Send a message via AIM to ZORG1986
Damn none of these messages are really helping solve the problem, i bet no one reading this has turned the code into an NPC yet, cause i know i haven't :P
__________________


Zorg (Era Staff) - Contact : [email protected]
Reply With Quote
  #9  
Old 07-31-2001, 11:29 AM
General General is offline
Banned
Join Date: Apr 2001
Location: Station Square
Posts: 984
General is on a distinguished road
Send a message via ICQ to General Send a message via AIM to General Send a message via Yahoo to General
The skull kreeps me out
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:57 PM.


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