Good morning,
Which map is it ? Does the target entity have health information which could be used to calculate exact amount of grenades needed to destroy it ?
We can't ignore EVENT.ENT_ENTER_RADIUS if distance is greater than AvoidRadius. If a bots is moving towards a grenade or a grenade is moving towards a bot, then the event is triggered once at distance 400.
If you want bots to go to ammo cabinets, you can change priority:
global OnBotJoin = function( bot )
{
wpn = bot.GetWeapon(WEAPON.ALLY_GRENADE);
if(wpn)
{
wpn.PrimaryFire.LowAmmoPriority = 0.82;
}
};
I updated goal_rolemanager.gm now so that you can use AllBots=true to assign all other bots to that role:
Roles =
{
ALLIES =
{
AllBots = true,
DEFENDER1 =
{
numbots = 2,
},
DEFENDER2 =
{
numbots = 2,
AllBots = true,
},
},
},
Why don't you use the PrintScreen key or Snipping tool to make screenshots ?
There must not be "=" in server.cfg. You have to delete = after set omnibot_path.
It would be too slow to search waypoints network every second for every bot. You can set a role for the goal and then assign the role to bots in triggers.
0x1005a is number 90 converted to hexadecimal.
You can use command /entitylist which prints all entities and their script names and target names. GetEntityByName searches target names.
Where can we download pk3 file of this map ?
Where can we download pk3 file of this map ?
You should never use entity numbers because they depend on mods. You should use GetEntityByName instead of GetGameEntityFromId. If the entity does not have any name, then you can use TraceLine.
Functions GetEntityByName and GetGameEntityFromId return null if the entity is invalid. Correct condition is:
if(ent1)
{
print("Entity is valid");
}
You must not use GetEntTeam in OnExit because it returns null if a player disconnected. Players can also change team when they are inside the region. See wiki how to count players in a region.
This is not related to bots. The same problem happens if you watch human players. There are a lot of bugs in the omnibot mod because it is based on the original game from year 2001. The spectator stamina is displayed correctly in newer mods (legacy, nitmod, noquarter, silent). It does not work in jaymod and etpub.
gm scripts are case-sensitive. There must be Goto, not GoTo.
Why didn't you copy the function from this page and paste it into your script (Ctrl+C, Ctrl+V) ?
Hi, welcome to the Omni-bot forum.
If you have scripted a lot, where are your scripts ? Could you please share a link to your scripts and waypoints ?
Util.EnableGoal and Util.DisableGoal can be used to activate ROUTE nodes. You can do this in a while loop in a thread.