Ok i have tried it.
But it seems i have interpreted your code wrong or i'm just stupid.
If i set the you pointer before the ent_create, shouldn't it be overwritten?

I wrote this code to check it
Code:
#include <acknex.h>
#include <atypes.h>
#include <default.c>

void bomb()
{
	my.skill3 = 100;
}

void shard()
{
        wait(1); // <-- added
	//my.skill1 = you.skill3;
        my.skill1 = my.parent.skill3; // <-- added
	while(1)
	{
		my.pan -= my.skill1*time_step;
		wait(1);
	}	
}

void detonate_ent(ENTITY* e)
{
	//ent_create(CUBE_MDL,vector(my.x,my.y,my.z+200),shard);
        ENTIY* created = ent_create(CUBE_MDL,vector(my.x,my.y,my.z+200),shard); //<-- added
        created.parent = e; // <-- added

}

void trigger_ent(ENTITY* e)
{	
	//wait(1);
	//you=e;
        // detoante_ent(you);
	detonate_ent(e); //<-- added
}

void detonator()
{
	ENTITY* test= ent_create(CUBE_MDL,vector(0,100,0),bomb);
	my.skill3 = 1;
	while(1)
	{
		if(key_d){trigger_ent(test);return;}
		wait(1);
	}
}

function main()
{
	video_switch(8,0,2);
	level_load(NULL);
	vec_set(screen_color,vector(255,0,0)); // blau 
	wait(3);
	fps_max = 60;
	ent_create(CUBE_MDL,nullvector,detonator);
	camera.x -= 1000;
}


The shard in this example is rotating slowly (as expected) cause its skill1 is set to 1 and not to 100 as i need it to be.
Ok i think i was too fast. I made a view changes and now i think its working for now.
The removed parts are commented and the new lines are marked with "//<-- added"

Last edited by Abarudra; 08/11/13 15:46.