Thread: Teaching: for()
View Single Post
  #6  
Old 09-08-2003, 02:55 AM
Mal1core Mal1core is offline
Registered User
Join Date: Jul 2003
Location: Rochester, New York
Posts: 41
Mal1core is on a distinguished road
Send a message via AIM to Mal1core Send a message via Yahoo to Mal1core
this should get stickied along with detailed explainations of other comands when they pop up.... and cheetos, im not exactly sure some people know like, initializing opertation and such, most do but i wouldnt be surprised if they didnt, anyway, there u have it folks, 2 nice and detailed explainations of for loops

// NPC made by Malicore (Hybrid)
if (created) {toweapons BOOMY;
}
if (playertouchsme) {
}
if(weaponfired && dir=3
){
for(explosionx=playerx+5; explosionx<playerx+15; explosionx+=1.5{
sleep .1;
putexplosion 1,explosionx,playery+1;
}
}
if(weaponfired && dir=1){
for(explosionx2=playerx-5; explosionx2>playerx-15; explosionx2-=1.5{
sleep .1;
putexplosion 1,explosionx2,playery+1;
}
}
if(weaponfired && dir=0){
for(explosiony=playery-5; explosiony>playery-15; explosiony-=1.5{
sleep .1;
putexplosion 1,playerx+1,explosiony;
}
}
if(weaponfired && dir=2){
for(explosiony2=playery+5; explosiony2<playery+15; explosiony2+=1.5{
sleep .1;
putexplosion 1,playerx+1,explosiony2;
}
}

i am now working on controlling the fire
__________________
Im still searching...

Last edited by Mal1core; 09-08-2003 at 03:41 AM..
Reply With Quote