oxwhirl/smac

Get Properpies of Spawn Points

AlRodA92 opened this issue · 3 comments

Hi,

Is there any way to obtain the position's values of the Spawn (Team1,Team2 for example) points? The same way that you can get the agent_id pos by get_unit_by_id(agent_id).pos

Thanks,

You could just look them up on the map via the SC2 Editor. But the spawning location changes from map to map, so you'd need to do this manually.

I don't know of any method to get the Team1/Team2 locations programmatically. When we spawn all units at the same point, it becomes the initial position for just 1 unit whereas others get spawned nearby but not exactly at the same location (since it is now occupied).

Yeah, I check that de initial point of only one unit is the spawn point. But my idea is set a third point on the map where no uits are spawn an get the value of that point programmatically. I have thought in create a not playable unit and passive/static (neither RL agent nor built-AI) at that point and try to get the position of that "agent" but I supposed I would have to change too much code in the original.

Or even create an structure but I do not know how to get the position either.

I think I get a way to do it. Thanks and if I think it is valuable I let you know.