CSGO: Random bots spawn

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

CSGO: Random bots spawn

Postby khaimovmr » Tue Nov 06, 2018 12:27 am

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!
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Random bots spawn

Postby khaimovmr » Sat Nov 10, 2018 10:27 pm

Bump up.

Guys, maybe something? )
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: CSGO: Random bots spawn

Postby Ayuto » Sun Nov 11, 2018 3:43 pm

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.
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Random bots spawn

Postby khaimovmr » Sun Nov 11, 2018 5:17 pm

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.
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: CSGO: Random bots spawn

Postby L'In20Cible » Sun Nov 18, 2018 1:11 am

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.
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Random bots spawn

Postby khaimovmr » Tue Mar 26, 2019 12:12 am

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.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 43 guests