help with ai
by ben trefethen · in Torque Developer Network · 06/11/2011 (7:29 am) · 8 replies
i cant get my AI bots to save i create them and add on crossbows and tracking but when i save shut it down
and reboot it it only gets the character and nothing else
ben
and reboot it it only gets the character and nothing else
ben
#2
06/12/2011 (8:30 am)
im using new aiplayer(name) { datablock="playerbody"; position=localclientconnection.camera.getposition(); };
#3
To save AI in a mission will usually requires some sort of marker and some script to spawn AI at the marker when the mission starts or when a player enters a trigger.
I have no idea if the documentation covers that or not, haven't looked, but there a few script-only AI Resources you could look for: AIGuard, Improved AIGuard, and Killer Korc. All of those use a marker that spawns a bot upon mission load. Look for Steve Acaster's FPS Example to see how to spawn bots from a trigger.
06/12/2011 (9:54 am)
This is through the console or in a script? If you're doing this by typing that line in the console then it will not save. To save AI in a mission will usually requires some sort of marker and some script to spawn AI at the marker when the mission starts or when a player enters a trigger.
I have no idea if the documentation covers that or not, haven't looked, but there a few script-only AI Resources you could look for: AIGuard, Improved AIGuard, and Killer Korc. All of those use a marker that spawns a bot upon mission load. Look for Steve Acaster's FPS Example to see how to spawn bots from a trigger.
#4
06/15/2011 (6:50 am)
how do i create a marker on my own that will drop guys and how do i program them
#5
06/15/2011 (5:37 pm)
Check out the aiGuard resource. There are actually several. AiGuard, aiPatrol, killerkork and advanced aiGuard. All of those are great examples of how to do what you are looking to do.
#6
06/16/2011 (3:51 pm)
i tried those and since i am a beginner i could'int make them work so if you could tell me that would be a great help
#7
we just released our new EKI One version.
There is also a complete new version for indies.
"Artificial Technology GmbH introduces a new, transparent pricing system for commercial and academic users of its proven middleware, EKI One. As a special introductory offer valid until 13 July, EKI One v2.6 and EKI One v2.6 Indie will be available for EUR 999 and EUR 99, respectively."
Fast Facts:
-EKI One offers tools for (H)FSMs, Ambience behavior,Navigation Data Generation, Lua scripting
-EKI One is extendable because of full Lua 5.1 support
-EKI One comes with Sandbox for prototyping, automated quality assurance and behavior previews
-EKI One comes with a special Unity Integration
-EKI One can be used for server sided ai/behavior simulation because of a special server version
... explore it by yourself
How can I get more information?
-Have a look at the Technology Teaser or read more about it at the EKI One Homepage - www.ekione.com
-Get a Trial Version at our online shop - www.shop.ekione.com
-Post at our Questions & Answers System - www.answers.ekione.com
We are looking forward to any kind of feedback.
06/17/2011 (2:33 pm)
Hey guys,we just released our new EKI One version.
There is also a complete new version for indies.
"Artificial Technology GmbH introduces a new, transparent pricing system for commercial and academic users of its proven middleware, EKI One. As a special introductory offer valid until 13 July, EKI One v2.6 and EKI One v2.6 Indie will be available for EUR 999 and EUR 99, respectively."
Fast Facts:
-EKI One offers tools for (H)FSMs, Ambience behavior,Navigation Data Generation, Lua scripting
-EKI One is extendable because of full Lua 5.1 support
-EKI One comes with Sandbox for prototyping, automated quality assurance and behavior previews
-EKI One comes with a special Unity Integration
-EKI One can be used for server sided ai/behavior simulation because of a special server version
... explore it by yourself
How can I get more information?
-Have a look at the Technology Teaser or read more about it at the EKI One Homepage - www.ekione.com
-Get a Trial Version at our online shop - www.shop.ekione.com
-Post at our Questions & Answers System - www.answers.ekione.com
We are looking forward to any kind of feedback.
#8
At the beginning, you'll find:
The code above used the gideon actor as your marker that you drop in while setting up your map. It does 1 thing. It tells torque where to drop your ai player.
Once it finds an empty marker, it drops an ai there.
The best way to understand the aiguard resource is to read all the comments. It is commented extremely well.
If you add it, and it doesn't work, make sure you are compiling the cpp/h files and that there aren't any errors, plus, make sure to add the cs file and ensure there are no errors there eather.
06/18/2011 (4:03 pm)
I use aiGuard resource.At the beginning, you'll find:
//The AIGuard marker is placed in the map during edit mode. When the map is loaded the
//marker is replaced by a guard player. (Assuming that the $AI_GUARD_ENABLED variable is set
//to true.) The marker is hidden or not depending on the value set in $AI_GUARD_MARKER_HIDE.
//The AIGuard marker can use a dynamic variable - set during map creation - called 'respawn'
//Creating and setting the 'respawn' variable will override the default value set in
//$AI_GUARD_DEFAULTRESPAWN. This allows more freedom in determining which bots respawn and which do not.
datablock StaticShapeData(AIGuardMarker)
{
// Mission editor category, this datablock will show up in the
// specified category under the "shapes" root category.
category = "AIMarker";
// Basic Item properties
shapeFile = "art/shapes/actors/gideon/base.dts";
};The code above used the gideon actor as your marker that you drop in while setting up your map. It does 1 thing. It tells torque where to drop your ai player.
function AIGuard::LoadEntities()
{
//Check to see if the AIGuards are to be loaded.
if ($AI_GUARD_ENABLED == true)
{
echo("Loading Guard entities...");
//This performs a search for all items within the radius from the starting point.
//All of the items that match "AIGuardMarker" trigger a bot to be placed at the
//position of the marker found.
%position = "0 0 0";
%radius = 100000.0;
InitContainerRadiusSearch(%position, %radius, $TypeMasks::StaticObjectType);
%i=0;
while ((%targetObject = containerSearchNext()) != 0)
{
if(%targetobject.getclassname() $= "StaticShape")
{
if (%targetobject.getDataBlock().getName() $= "AIGuardMarker")
{
%i++;
%player = AIGuard::spawnAtMarker("Guard" @ %i, %targetobject);
}
}
}
}This code tells torque to look for the aiGuard marker. If it already has an ai active in it, look for another one.Once it finds an empty marker, it drops an ai there.
The best way to understand the aiguard resource is to read all the comments. It is commented extremely well.
If you add it, and it doesn't work, make sure you are compiling the cpp/h files and that there aren't any errors, plus, make sure to add the cs file and ensure there are no errors there eather.
Associate Michael Hall
Distracted...