I have two papers and a prob-stats exam due Friday but I think I'll crack down on this and try to get it by Monday.

But all in all, C-Script wasn't terribly different from Lite-C, a functioning code wouldn't be too difficult.

Just somethings to consider after looking at a few pages of the tutorial:

1. time is replaced by time_step

2. temp is no longer defined in the engine and must be declared like any other vector, var, pointer, whatever.

3. lite-c is case sensitive whereas C-Script was not. FUNCTION, ACTION, IF, WHILE, were valid in C-Script but not in Lite-c. Same goes for c_move, c_trace, and c_scan modes.

4. Flags are no longer set by the object-dot-property method but by either the set/reset macro or the flags |= / flags &= method. (there is also flags2 and emask)

5. Precompiler instructions (#include and #define) must be lower case and begin with a "#". .wdl files cannot be used in a .c project and .c projects do not use angular brackets but quotations (ex: #include "movement.c"). Header files (acknex.h) do use angular brackets. Precompiler instructions do not require semicolons, as c-script instructions did (c_script had no true precompiler instructions, everything was compiled at once)

6. actions are now a type of function and must have parenthesis even though actions do not return any value, nor do they pass parameters.

7. var cannot access .x, .y, .z, .pan, .tilt, or .roll like they use to be able to in C-Script. You must either use VECTOR or ANGLE. Alternatively, a 3 variable array can be used, with myVar[0] being x. Any 3 consecutive skills (my.skill1, my.skill2, my.skill3) can also be vectors but note that if you use my.skill1 as a vector, you can't use my.skill2 or my.skill3 for some other variable.

8. Not exactly a syntactical error, but something that makes code clearer, after a conditional branch (if, while, for, etc), if the instruction does not exceed 1 line, curly braces are not needed.

while(!player) { wait(1); } //c-script
while(!player) wait(1); //lite-c

9. trace_mode and move_mode have been built into c_move and c_trace (c_move(entity,relative_distance,absolute_distance,move_mode); and c_trace(to,from,trace_mode);) and the flags in the modes are capitalized.

10. on_key = function; assignments in c_script could be placed outside of functions, anywhere in the script. This is not true in lite-c. In lite-c, on_key assignments are called in a function. Alternatively, we can use "function on_key_event() { doStuff(); } for key strokes. Or we can wait for key strokes in a while loop:
Code:
while(1)
{
  if(key_space)
      jump();
  wait(1);
}


These 10, I'm sure aren't the only differences.

I'll see if I can convert the script this weekend.

Last edited by heinekenbottle; 12/03/08 20:52.

I was once Anonymous_Alcoholic.

Code Breakpoint;