If you run this modified code
Code:
var new_counter = 0;

void exploeffect()
{
	my.skill1 = 123;
	wait(3);
	my.skill1 = -123;
	ptr_remove(me);
}


void main()
{
	VECTOR temp;
	level_load("");
	wait(3);
	while(1)
	{
		new_counter -= time_step;
		if(new_counter <= 0)
		{
			new_counter = random(5);
			vec_set(temp,vector(200+random(100),random(100)-50,random(100)-50));
			you = ent_create(CUBE_MDL,temp,exploeffect);
			if(your.skill1 != 123 || 1) printf("ohh (%d)",(int)your.skill1);
		}
		for(you = ent_next(NULL); you != NULL; you = ent_next(you))
		{
			if(your.skill1 != 123) printf("hm (%d)",(int)your.skill1);
			vec_set(temp,your.x);
			if(vec_to_screen(temp,camera)) draw_text(str_for_entfile(NULL,you),temp.x,temp.y,COLOR_RED);
		}
		wait(1);
	}
}


you will see that you get three "ohhs" before the first "hm" appears, correlating to the wait(3) in the exploeffect function.
I don't know why though, so sorry for not being able to help at all. :<

EDIT: Oh and the "hm" error message shows a skill value of 0, not -123 as I would have expected.

Last edited by Superku; 03/29/15 16:00.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends