Page 1 of 1

CSGO: Random bots spawn

Posted: Tue Nov 06, 2018 12:27 am
by khaimovmr
Hey, guys!

I'm trying to find a correct approach to implement random spawning the bots near to the player.
I want to make those bots spawn in a periodical manner within some range around. It would be great if it will be a real random location but the spawn on nearby bot waypoints or maybe on other points that every CS map have - would be great.

Can you give me a clue - where to dig?

Thank you!

Re: CSGO: Random bots spawn

Posted: Sat Nov 10, 2018 10:27 pm
by khaimovmr
Bump up.

Guys, maybe something? )

Re: CSGO: Random bots spawn

Posted: Sun Nov 11, 2018 3:43 pm
by Ayuto
A good start would be to take a look at the *.nav files to see what information they contain. IIRC, there are Python libraries to parse them.

Re: CSGO: Random bots spawn

Posted: Sun Nov 11, 2018 5:17 pm
by khaimovmr
Ayuto wrote:A good start would be to take a look at the *.nav files to see what information they contain. IIRC, there are Python libraries to parse them.

Thank you, Ayuto! I'll dig this way.

Re: CSGO: Random bots spawn

Posted: Sun Nov 18, 2018 1:11 am
by L'In20Cible
I'm fairly sure I remember seeing a method used to select a spawnpoint for player. Hooking that method could allow you to create or move a spawnpoint to any location of your choice before returning it. I will see if I can find its name again.

EDIT: The method is CBasePlayer::EntSelectSpawnPoint. If you pre-hook it, you could return any spawnpoint entity located at the position of your choice.

Re: CSGO: Random bots spawn

Posted: Tue Mar 26, 2019 12:12 am
by khaimovmr
L'In20Cible wrote:I'm fairly sure I remember seeing a method used to select a spawnpoint for player. Hooking that method could allow you to create or move a spawnpoint to any location of your choice before returning it. I will see if I can find its name again.

EDIT: The method is CBasePlayer::EntSelectSpawnPoint. If you pre-hook it, you could return any spawnpoint entity located at the position of your choice.


I've talked about the acquiring the locations of the spawns or bot waypoints located on the map.
Thank you for the info thought, interesting hook to use.