I am rewriting some functions, to have a cleaner code and a faster game. I`ve got adviced, to preload my entities and instead of ent_remove, I should just hide the entities. Ok - enties got loaded and here are my first problems
var epos[40][3];
var enemy[80];
...
// Positionen Welle 3
epos[16][0] = -165; epos[16][1] = 800; epos[16][2] = 270;
...
// Welle 3
for(i=16; i<24; i++)
{
enemy[i] = ent_create("bee2.mdl", vector(epos[i][0], -epos[i][1], epos[i][2]), enemy_attack);
}
...
1.) I can`t call ENTITY like enemy[16].y=800; - error
2.) Instead of "enemy_attack" I want to create ENTITY without a function(NULL), because I don`t want the engine run through functions, if it`s not nessesary. But how can I point to my entities?
I need something with "me"
THX
Ditje