#Monster Hunter - new bugs
1 messages · Page 1 of 1 (latest)
looks like precache error
I've tested AddBotPlayerWithEntityScript and it have a few issues compared to AddBot:
-
Bots will always spawn at the center of the map. After death they respawn at a regular respawn point. Using
FindClearSpaceForUnitto teleport them to base is a good solution. If you run the function at the hero selection stage or strategy time, the bots will spawn the heroes before the pregame starts. -
It will not precache the heroes, so you need to precache everything before they spawn. I used
PrecacheUnitByNameSyncto precache all heroes the bots will select, worked 80% of the time, but some heroes were still getting a "error" model near their feet or missing some cosmetic. Maybe some particles needs to be precached too. Maybe I should have usedPrecacheUnitByNameAsync, I'll test later. -
If you use convars for
dota_bot_disableThey will move and play, butnever attempt to buy items. It's good or bad, depending on how you want to use them.