Thread: Teaching: for()
View Single Post
  #1  
Old 09-07-2003, 08:57 PM
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
Teaching: for()

for those of you who are new like me and dont know how the for command it used, its like saying:


i=0//the index is equil to zero
while(i<64)//this is like adding to the if(), saying the index must be less then 64.
and then the last section is adding or subtracting forom the index.
so all together it looks like:

for(i=0; i<64; i+=2{
in here u may put commands. i will also give one example of how this may be used.

if(created){toweapons test;
}
if(weaponfired){
for(explosionx=playerx; explosionx<64 explosionx+=1.5
putexplosion 1,explosionx,playery+1;
}
}

this script is a little messed up but does show a little how to use for.

note: props to jagen for teaching me what for's are, and also if someone can show me how to put in a scripting section to make this easier to read it would be greatly apreciated.
__________________
Im still searching...

Last edited by Mal1core; 09-07-2003 at 11:04 PM..
Reply With Quote