Is something like this what you're looking for? smile

Code:
ENTITY* create_enemy(STRING* _mesh,VECTOR* _pos,var _health, var _attack, var _defense)
{
	you = ent_create(_mesh,_pos,enemy_action);
	you.health = _health;
	you.attack = _attack;
	you.defense = _defense;
	
	return you;
}



Edit: I don't know whether you can use "ENTITY*" as a return type (though I don't see why not), but otherwise you could always just return a handle then.

Last edited by Claus_N; 08/03/09 21:54.