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.