Hi, what is the best way to count the total number of the same entity present in a map?
I would like to count the number of my spawn entities (for clarity, they are named "spawn_cube.mdl") in my map, store pointers to the entities, and use the pointers so that I can randomly select a spawn location for my player.
Re: Best Way to Count Total Number of Entities
[Re: 82RJZAE]
#422049 05/01/1300:2205/01/1300:22
Alternatively, you can use the str_for_ent commands or how they are called to compare the file, and/ or run this loop once on level initialization and store them in an array/ a list.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual
To calculate the number of entities in the level there is the word ent. Just include default.c in your project and when you are in your level made F11. Next to ent to find the number of your entity level. In the Manual Engine -> Hot Keys.