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-01-2002, 08:58 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
Help plzz

I have made a script that fades into the level kinda like dustari well it works except it keeps going????
plz help



//#CLIENTSIDE
for (fade.i=0; this.i<=.4; this.i-=.04 {
seteffect .01,0,0,this.i;sleep .05;}
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #2  
Old 07-01-2002, 09:33 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
fade.i=0 ? try this.i (this isn't the problem, just an error)

but your math is all wrong, what you are doing is saying this

this.i = 0
while(this.i <= .4) {
dostuf;
}
this.i-=.4
it will never stop since you keep subtracting, it will never be greater than .4
Since your this.i is always less than 0, not only will it not stop, but negitive valuse don't fair too well on the alpha.

maybe you should try reworking your math.

first, think of what you want to achive, you want to fade into the level, so you want to start your this.i at .4, since .4 would be the initial darkness of the level. Next, you wanna subtract from .4 untill you reach zero.

figure it out. I gave you some directions. try to do something with it (I wish not to fix your things for you, rather point out what you can do the help it)
__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 07-01-2002, 10:08 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
thx

Thanks i just tried this i didnt know if i could d it but thanks for the help!
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #4  
Old 07-01-2002, 10:13 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
umm

Now it does what i want but backwards fades into dark....
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #5  
Old 07-01-2002, 10:36 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
then reverse what you are doing?
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 07-01-2002, 12:26 PM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
umm

I just added a + where the - was IM SO CONFUSED
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #7  
Old 07-01-2002, 01:13 PM
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
Well something simple like this shouldn't require much thought. You wanna take a value (.4) and make it into 0 gradually. lets think now. How can we do this with the for operative? I know we can start out at .4 and then subtract .04 while it is greater than or equal to 0!!
for(this.i=.4;this.i>=0;this.i-=0.04)


now you have this.i moving down .04 every time it loops... figure out the rest.
__________________

subliminal message: 1+1=3
Reply With Quote
  #8  
Old 07-01-2002, 10:11 PM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
YAY

Hey it worked and thanks for helping me
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
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 01:34 PM.


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