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
  #1  
Old 12-18-2001, 09:33 AM
cell424 cell424 is offline
Registered User
Join Date: Mar 2001
Location: USA/PA
Posts: 184
cell424 is on a distinguished road
Send a message via AIM to cell424
My mega Elite Rain Script!

Here is my rain script,I ahve one that snows too, and as you walk around the snow starts to blow like the wind is pushing it!

Main Code-
//Rain by Trunks
if(playerenters&&level.rain=1){
this.start=1;
}
if(this.start=1){
setarray rainx,level.maxrain;
setarray rainy,level.maxrain;
setarray rainx2,level.maxrain;
setarray rainy2,level.maxrain;
setarray raint,level.maxrain;
for(this.r=0;this.r<level.maxrain;this.r++){
rainx[this.r]=int(random(0,64));
rainy[this.r]=int(random(0,64));
rainx2[this.r]=rainx[this.r];
rainy2[this.r]=rainy[this.r];
raint[this.r]=int(random(5,15))}
this.start=0
}
if(timeout&&level.rain=1){
for(this.i=0;this.i<level.maxrain;this.i++){
if(rainy[this.i]-rainy2[this.i]>raint[this.i]){
//putleaps 5,rainx[this.i],rainy[this.i];
rainx[this.i]=int(random(0,64));
rainy[this.i]=int(random(0,64));
rainx2[this.i]=rainx[this.i];
rainy2[this.i]=rainy[this.i];}
showimg this.i,raindrop.gif,rainx[this.i],rainy[this.i];rainx[this.i]+=0.3;rainy[this.i]+=0.5;}
//sleep 0.05
}
timeout=0.05
-Code

Second Code-
if(created){
this.start=0;
level.rain=1;
level.maxrain=100;
}

-Code


__________________
Trunks
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:22 AM.


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