SamuelDravis Posted August 19, 2002 Share Posted August 19, 2002 does anyone know how to make a loop in a script? i know some QBASIC and VisualBasic6. also, do scripts support IF..THEN statements or their equivalent? thanks Link to comment Share on other sites More sharing options...
Erliko Posted August 19, 2002 Share Posted August 19, 2002 i think it's just 'LOOP' at least in the language i programmed in.. what language are you programming in? i programmed in a 'videogamecreatorprogram that used a language that combinded Basic with C++ (DIV) BEGIN IF BLABLA THEN JADA JADA:END LOOP Link to comment Share on other sites More sharing options...
Joben Posted August 19, 2002 Share Posted August 19, 2002 ummm how bout reading the ICARUS manual Samuel? here i shall quote it. loop - is a simple command that allows you to execute a sequence of commands repeatedly. So instead of: wait ( 3000 ) print ( ?Hello World!? ) wait ( 3000 ) print ( ?Hello World!? ) wait ( 3000 ) print ( ?Hello World!? ) wait ( 3000 ) print ( ?Hello World!? ) You could simply use: Loop ( 4 ) { wait ( 3000 ) print ( ?Hello World!? ) } If you wish a loop to continue forever, put a ?-1? in the loop number. Loop ( -1 ) { wait ( 3000 ) print ( ?Hello World!? ) } This will make these two commands repeat forever or until these commands are flushed. Link to comment Share on other sites More sharing options...
SamuelDravis Posted August 20, 2002 Author Share Posted August 20, 2002 i wanted to use it in my music_change1.05 script instead of all those cmds. does JK2 use basic, or is it something particular to JK2? thanks though, Joben and Erliko Link to comment Share on other sites More sharing options...
Joben Posted August 20, 2002 Share Posted August 20, 2002 sry then. umm wait o_O exactly how much shorter do you want than? loop (X) { } I dont realy know much about the scripting yet it seems mostly to be its own mini language., that structure right there looks like C but it might just be a common syntax thing i dont know any other languages at all. Link to comment Share on other sites More sharing options...
Primesghost Posted August 20, 2002 Share Posted August 20, 2002 Scripting in JK2 is sort of a pseudolanguage. You use predefined methods like "set" "seta" "sets" "bind" etc. These are defined within the code, you are then passing arguments to these methods "command1; command2; commandN" I don't really think there's a way to create a loop in a cfg file. I could be wrong though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.