how can I start with AI on T3D?

There are no stupid questions, just stupid answers.
32 posts Page 2 of 4
LukasPJ
Site Admin
Posts: 348
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Sun Apr 12, 2015 10:50 am
Johxz wrote:Some other weird thing, when I use this "setMoveDestination"

Bob.setMoveDestination(LocalClientConnection.camera.getTransform()); // This work fine
Bob.setMoveDestination(Dirk); //This not... "bob" go to the edge corner of the terrain.

If I echo the dirk position and passed to bob, like this:
bob.setMoveDestination(123 123 123);

bob go to the position.

This was a test on t3d 3.7rc. If I do this tutorial on t3d 3.6.3 works fine (rapid fire not just once) even has sound when you load ammo or shoot. With 3.7rc don't have this sound.

Maybe is a update going on related to this?

The issue here is that:
Bob.setMoveDestination(Dirk);

Tells Bob to move to coordinate "Dirk" which will probably be parsed as: "Dirk 0 0" which is wrong. You have to use:
Bob.setMoveDestination(Dirk.getTransform());

--
I don't know what's going on with the trigger image. Are you sure you gave him enough ammo?
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Apr 12, 2015 4:31 pm
Thanks Lukas, Ok I do a more controlled test.

hahaha this is funny when I set MoveDestination(NAME) go to a random point in 3.7 to a corner of the terrain (very far) but in 3.6.3 go to a random point more centric and casually my other bot was there, so when setMoveDestination always reach my other bot Dirk :lol:

To summarize 3.7rc don't have the sound and the rapid fire don't work, only shoot once.

// 3.7rc
Bob.setMoveDestination(Dirk); // don't work
Bob.setMoveDestination(Dirk.getPosition()); // fine
Bob.setMoveDestination(Dirk.getTransform()); // fine
Bob.mountImage(LurkerWeaponImage, 0); // Ok (No sound)
Bob.incInventory(LurkerAmmo, 50); // give him 30 ammo it's ok. (No sound)
Bob.setImageTrigger(0,1); // shoot once (if I shoot four time and then give him ammo fill four bullet). (No sound)

// 3.6.3
Bob.setMoveDestination(Dirk); // don't work
Bob.setMoveDestination(Dirk.getPosition()); // fine
Bob.setMoveDestination(Dirk.getTransform()); // fine
Bob.mountImage(LurkerWeaponImage, 0); // Ok (With sound)
Bob.incInventory(LurkerAmmo, 50); // give him 30 ammo it's ok. (With sound)
Bob.setImageTrigger(0,1); // fine - Rapid fire (With sound)
Bob.setImageTrigger(0,0); // fine - Stop fire
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Mon Apr 13, 2015 2:43 am
Hi,

I'm doing this tutorial https://www.garagegames.com/community/resources/view/21604

I already do the second part, but I have a doubt, this:
Now we need a "navPath" to use "theNavMesh" and for or Ai to run down. Again this is under (library -> level -> navigation) and you want to call this object "navPath1". In it's "mesh" field enter "theNavMesh" so it's linked to our navMesh.

the navPath that refer the tutorial is this, right?

navPath.JPG
navPath.JPG (9.19 KiB) Viewed 1791 times

BTW, I don't see a error in the console, but the Bot1 go to the corner far in the terrain, see my reply above. :o

What this mean? I copy and paste the script from Steve. :?
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Mon Apr 13, 2015 12:51 pm
Bob.setMoveDestination(Dirk);

Should be
Bob.setMoveDestination(Dirk.getPosition());

I think. EDIT: oops, didn't see page 2.

But that other stuff sounds worrying. This is the first thing that comes to mind. Will investigate.

As for the Chinatown deathmatch code, it uses an old version of the Recast/navPath code. The new version works differently, so you'll have to modify his code. The old code looked something like this:
for(%i = 0; %i < %path.getCount(); %i++) {
%obj = %path.getObject(%i);
%pos = %obj.getPosition();
}

You now use:
for(%i = 0; %i < %path.size(); %i++) {
%pos = %path.getNode(%i);
}
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Tue Apr 14, 2015 3:22 am
Thanks Daniel @
User avatar
buckmaster
I will go check it out... btw I want to clarify I'm using 3.7rc with a blank level, a terrain and a couple of convex boxes for doing the tutorial from steve.
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Apr 19, 2015 8:07 am
Thanks for help, I have some progress in ai with torque 3d

Can I use AIPlayer with walkabout? I want my bot evade the objects. How can do that?

Thanks
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Sun Apr 19, 2015 10:32 am
Of course you can! What are you trying to do? Have you opened up the nav editor and had a play with it yet? I just threw this wiki page together with the Walkabout documentation.
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Apr 19, 2015 4:44 pm
Hi Daniel,

I saw the tutorial videos from walkabout a few weeks back, but don't know how to mix AIPlayer with walkabout...I will go to read the documentation, thanks I miss this link "WalkaboutDocumentation.html".

What are you trying to do?


Become familiar with AI on T3D. If you have some relevant info about this I really appreciate it.

Right now I want my "Bob.Bot" go from A to B without collide with walls. :)
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Mon Apr 20, 2015 2:29 am
You didn't see the documentation before because it wasn't online anywhere ;). This section shows you how to use the script interface, so it's probably where you should be looking.
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Wed Apr 22, 2015 9:41 pm
Thanks that was looking for...

I have another question sorry. I already read this
https://eightyeight.github.io/walkabout ... ng-navpath

From the Steve tutorial
Now we need a "navPath" to use "theNavMesh" and for or Ai to run down. Again this is under (library -> level -> navigation) and you want to call this object "navPath1". In it's "mesh" field enter "theNavMesh" so it's linked to our navMesh.


coverPoint.jpg
coverPoint.jpg (17.4 KiB) Viewed 1665 times


But in navigation folder only have Cover Point. How I can create a NavPath? :?

the question is: walkabout have a object "graphically" for add a path? like cover point?
:?: :?: :?: :?:
32 posts Page 2 of 4

Who is online

Users browsing this forum: No registered users and 1 guest