[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4783: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4785: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4786: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897) TribalOutpost.com Forums • View topic - just cant build em...
i have my map set and everything. and im pretty sure im building everthing correctly with the bots. its just, when i build the bot graph, it stops about half way and says building bridge, or something. i let it sit there for a while and it doesnt finish. im not sure but i think that it cant find a rout up to the sky bases i have set up, from the ground bases. i have a transport FF to the top.
You can go here for help on building Spawn/Ai Graphs.
From what you said it is exactly working right. You see the editor has to lay out a blue graph on the terrain first. Then it has to build the green nodes on interiors. Last (and this is what takes a long time to do) the editor has to build the yellow bridges that connect every point on the terrain to every point on the interriors and all points in between. It is a lot of work and I suggest you shut off your screen saver and go get something to drink. Depending on the size of the map and the height range of the map, and how large/many interiors you have in the map. I have waited up to 1 hour for the graphs to complete.
After you have build the SPAWN GRAPH the NAV GRAPH takes even longer. Then when you build the LOS GRAPH you can see the editor acually shooting "ray casts" from every point to every point in the map to check for Line Of Sight (LOS). So the Bots know when they can shoot at you
NOTE: Bots do not work well if you placed Interiors to high for them to fly to. Also if you have Water or Lava underneath your interrior you can forget about Bots (even if Interior is touching terrain). If your map is a Siege map you must make the force fields into "jail bars" (like in Alcatraz map has green FF in switch base). Solid force fields may work at first but when teams switch sides Bots on one team will stand around with no NAV paths to follow
If you want the bots to use the FF Transport you will have to do some custom Ai Scripting to tell them to "stepInto the FF and applyImpluse" But that is far beyond building Graphs.
oh well...i guess ill leave it, because i dont know how to script bots to do that. i got it to work. it did take a long time to. but one thing i would like to fix is the bots go under the base, because i have it above the ground like 7-10 meters, and they try to get to the top and keep hitting there heads. also, since the bots cant get up to the top base, where the flag is, the ones going to protect it, stay on the ground in jug armor...its gay. but itll do i guess...
If the bots can't get up to the base try puting some floating pads around the base so the bots can use them. If the bases are too high try changing the bots loadout to use energy pack instead of ammo packs this, will help them getting up high. This involves editing the .mis file > AI objectives.
The latest Tribes editor is not the same as that seen in the tutorials. Use the tutorials provided and for information on using the newest editor.
----------------------------
Don't post a query if the function can deal with it for you.
Copy and paste these lines and OVER WRITE the function function AIProcessBuyInventory(%client) that is found in aiInventory.cs file
This may help with bots getting to inventory, but keep in mind that a lot of the "interior.dif" files just will not work with Bots. When placing invetory stations in map take the time to make sure they are above the ground/floor (not stuck in it, not even a little) this can screw up the NAV Graph sometimes (everytime with Sentry Turrets and sometimes with Solar Panels)
[PHP]//--------------------------------------------------------------------------------------------------
//long needed fix for AI in Tribes 2 ---------------------------------------------- Lagg... 3-14-2003
//bots will never get stuck on a inventory again :)
function AIProcessBuyInventory(%client)
{
//get some vars
%player = %client.player;
if (!isObject(%player))
return "Failed";
%closestInv = %client.invToUse;
%inventorySet = %client.invBuyList;
%buyingSet = %client.buyingSet;
//use the Y-axis of the rotation as the desired direction of approach,
//and calculate a walk to point 1.1 - 1.3 m behind the trigger point - Lagg...
%aprchDirection = MatrixMulVector("0 0 0 " @ getWords(%closestInv.getTransform(), 3, 6), "0 1 0");
%aprchDirection = VectorNormalize(%aprchDirection);
//make sure it's still valid, enabled, and on our team
if (! (%closestInv > 0 && isObject(%closestInv) &&
(%closestInv.team <= 0 || %closestInv.team == %client.team) && %closestInv.isEnabled()))
{
//reset the state machine
%client.buyInvTime = 0;
//return "InProgress";
echo("RETURN FAILED ! - LAGG...");
return "Failed";
}
//make sure the inventory station is not blocked
%invLocation = %closestInv.getWorldBoxCenter();
InitContainerRadiusSearch(%invLocation, 2, $TypeMasks::PlayerObjectType);
%objSrch = containerSearchNext();
if (%objSrch == %client.player)
%objSrch = containerSearchNext();
//the closestInv is busy...
if (%objSrch > 0)
{
//have the AI range the inv
if (%client.seekingInv $= "" || %client.seekingInv != %closestInv)
{
%client.invWaitTime = "";
%client.seekingInv = %closestInv;
%client.stepRangeObject(%closestInv, "DefaultRepairBeam", 5, 10);
}
//inv is still busy - see if we're within range
else if (%client.getStepStatus() $= "Finished")
{
//initialize the wait time
if (%client.invWaitTime $= "")
%client.invWaitTime = getSimTime() + 5000 + (getRandom() * 10000);
//else see if we've waited long enough
else if (getSimTime() > %client.invWaitTime)
{
schedule(250, %client, "AIPlayAnimSound", %client, %objSrch.getWorldBoxCenter(), "vqk.move", -1, -1, 0);
%client.invWaitTime = getSimTime() + 5000 + (getRandom() * 10000);
}
}
else
{
//in case we got bumped, and are ranging the target again...
%client.invWaitTime = "";
}
}
//else if we've triggered the inv, automatically give us the equipment...
else if (isObject(%closestInv) && isObject(%closestInv.trigger) && VectorDist(%closestInv.trigger.getWorldBoxCenter(), %player.getWorldBoxCenter()) < 1.5)
{
//first stop...
%client.stop();
//armor must always be bought first
if (%item $= "Light" || %item $= "Medium" || %item $= "Heavy")
{
%player.setArmor(%item);
%index++;
}
//set the data block after the armor had been upgraded
%playerDataBlock = %player.getDataBlock();
//next, loop through the inventory set, and buy each item
if (%buyingSet)
%item = $AIEquipmentSet[%inventorySet, %index];
else
%item = getWord(%inventorySet, %index);
while (%item !$= "")
{
//set the inventory amount to the maximum quantity available
if (%player.getInventory(AmmoPack) > 0)
%ammoPackQuantity = AmmoPack.max[%item];
else
%ammoPackQuantity = 0;
//get the next item
%index++;
if (%buyingSet)
%item = $AIEquipmentSet[%inventorySet, %index];
else
%item = getWord(%inventorySet, %index);
}
//put a weapon in the bot's hand...
%player.cycleWeapon();
//return a success - but wait if we are not healed all the way :) - Lagg...
if (%player.getDamagePercent() <= 0)
{
//get away from inventory if we are done - Lagg...
%client.setDangerLocation(%invLocation, 15);
return "Finished";
}
}
//else, keep moving towards the inv station
else
{
if (isObject(%closestInv) && isObject(%closestInv.trigger))
{
//quite possibly we may need to deal with what happens if a bot doesn't have a path to the inv...
//the current premise is that no inventory stations are "unpathable"...
//this is true so I have fixed it some what - Lagg... :)
//if (%client.isSeekingInv)
//{
// %dist = %client.getPathDistance(%closestInv.trigger.getWorldBoxCenter());
// if (%dist < 0)
// error("DEBUG Tinman - still need to handle bot stuck trying to get to an inv!");
//}
//calculate the approachFromLocation
if (%closestInv.getDataBlock().getName() $= "MobileInvStation")
%factor = -2;
else
{
%clientArmor = %client.player.getArmorSize();
if (%clientArmor $= "Heavy")
%factor = -1.3;//1.3m behind inv trigger for heavy bots
else if (%clientArmor $= "Medium")
%factor = -1.1;//1.1m behind inv trigger for medium bots
else
%factor = -1.1;//1.1m behind inv trigger for light bots
}
%aprchFromLocation = VectorAdd(%invLocation,VectorScale(%aprchDirection, %factor));
%client.stepMove(%aprchFromLocation);
%client.isSeekingInv = true;
}
return "InProgress";
}
}[/PHP]