Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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:48 PM.


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