Code:
void act_shellpearl()
{
	you = ent_create("pearl28.dds", vector(my.x, my.y, my.z + 2), NULL); 
	you.tilt = 90;
	you.ambient = 100;
	you.scale_x = 0.8;
	you.scale_y = you.scale_x;
	set(you, PASSABLE | INVISIBLE);
//
	you.parent = me;
//
	my.emask |= (ENABLE_IMPACT | ENABLE_ENTITY | ENABLE_SCAN | ENABLE_DETECT);
	my.event = shellpearl_event;
	while(1)
	{
		//action of the my entity..
		// I have to toggle here the visibility of the you entity
	}
	ent_remove(me);
}


and in the pearls action, put something like
if(my.parent==NULL) ent_remove(me)


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial