Ulysses
General => Developers Corner => Topic started by: Doomed on February 16, 2017, 06:50:55 PM
-
How would I go about adding a check to make sure an info_player_red or info_player blue exists on a given map? The gamemode can have 2 to 4 (red, blue, green or yellow) teams depending on the map and the way it is currently somebody may spawn on the green team although that team may not exist on that map.
-
From my understanding, spawn points are a 'class' of a map entity.
One way...
local red_spawns = ents.FindByClass( "info_player_red" )
local blue_spawns = ents.FindByClass( "info_player_blue" )
.. green ..
.. yellow ..
Then check if tables are empty.
-
thanks for reply, ya all i had to do was loop through the info_player_* ents.