I won't fix that (but it's really easy :> ). Use simple work around for setting variable to zero. Something like this:
Code:
function blahblah(){
	var run_at_once = 1;
	while(1){
		if(run_at_once == 1){
			....
			
			// all stuff you'll insert in here, will run only once
			// will you'll set "run_at_once" again to "1"
			
			...
			run_at_once = 0;
		}
		wait(1);
	}
}

For "i++" you shouldn't use exactly that, Rei just showed you the place of "i++" from the "for" loop.
Instead of that, you need to create a var, insert set it to the initial value, make a comparison (as in "for").
And then increase it by 1 each tick, that will do the job, this is really first steps which you need to handle yourself.

Edit: I've just made it myself :>

Code:
action act_emitter(){
	// variables:
	var run_once[3];
	var comp_var[3];
	var end_var[3];
	// set start for "once" variable:
	vec_fill(vector(run_once[0], run_once[1], run_once[2]), 0);
	// main loop:
	while(1){
		// init first end var:
		end_var[0] = 3; // as in the script
		// init first start var:
		if(run_once[0] == 0){
			comp_var[0] = 0; // init!
			run_once[0] = 1;
		}
		// first fake "for" loop:
		while(comp_var[0] < end_var[0]){
			// init second end var:
			end_var[1] = 3;
			// init second start var:
			if(run_once[1] == 0){
				comp_var[1] = 0; // init!
				run_once[1] = 1;
			}
			// second fake "for" loop:
			while(comp_var[1] < end_var[1]){
				// increase second loop variable:
				comp_var[1] += 1;
				wait(1);
			}
			// increase first loop variable:
			comp_var[0] += 1;
			wait(1);
		}
		// init second end var:
		end_var[2] = 3;
		// init second start var:
		if(run_once[2] == 0){
			comp_var[2] = 0; // init!
			run_once[2] = 1;
		}
		// third fake "for" loop:		
		while(comp_var[2] < end_var[2]){
			// increase third loop variable:
			comp_var[2] += 1;
			wait(1);			
		}
		wait(1);
	}
}



Last edited by 3run; 06/25/12 19:03.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung