Posted By: HeelX
Getting view entities... - 08/22/10 09:11
Hi folks,
I didn't work with view entities a long time, maybe I am doing something terribly wrong. I have a static mesh level and one static view entity which is my sky entity. What I want to do is to get this entity after loading the level:
But all I get are 0 entities... how do I access the list of static entities here?
Bye,
-Chris
I didn't work with view entities a long time, maybe I am doing something terribly wrong. I have a static mesh level and one static view entity which is my sky entity. What I want to do is to get this entity after loading the level:
Code:
ENTITY* entSkycube = { type = "skycube+6.tga"; flags = UNLIT; flags2 = SKY | CUBE | SHOW; } int main () { //... level_load("test_0001.wmb"); //... int ents = 0; ENTITY* ent = ptr_first(level_ent); while (ent) { ents++; ent = ent.link.next; } printf("ents = %d", ents); //out: "ents = 0" }
But all I get are 0 entities... how do I access the list of static entities here?
Bye,
-Chris