Forums Gallery Downloads LOGIN |REGISTER

Ai Fail + Lua Scripting

Please use this forum for questions on C++, Lua, XML, and any other languages used in CryENGINE development.


 

User avatar
saberdam
Junior Dev
Junior Dev
 
Posts: 160
Member since: 30.11.2010, 17:20
Likes: 63

Ai Fail + Lua Scripting

Postby saberdam » 12.02.2012, 03:14

Hello,


i am testing some AI stuff and scripting in Lua. So i write a Ai that is following the player and trying to melee attack him. The problem is really weird.
When i am testing my Ai in the forest which i created, everything is ok. In other Areas of the map the Ai is normal too. When i am testing the AI in a part of the map where i have a building build by my self with sketch up the AI runs away?! Sometimes in the beginning he chases me than he begins to run a away after some seconds.
Can someone explain why he hates this part of the map or my building so much?

I post 2 videos to understand the problem.

Normal AI: http://youtu.be/OHUz77g3bwo
Weird AI : http://youtu.be/r07J4Wve8Jw
AndOrXor
Junior Dev
Junior Dev
 
Posts: 178
Member since: 19.08.2011, 10:04
Location: Prague, Czech Rep.
Likes: 1

Re: Ai Fail + Lua Scripting

Postby AndOrXor » 12.02.2012, 11:04

saberdam wrote:Hello,


i am testing some AI stuff and scripting in Lua. So i write a Ai that is following the player and trying to melee attack him. The problem is really weird.
When i am testing my Ai in the forest which i created, everything is ok. In other Areas of the map the Ai is normal too. When i am testing the AI in a part of the map where i have a building build by my self with sketch up the AI runs away?! Sometimes in the beginning he chases me than he begins to run a away after some seconds.
Can someone explain why he hates this part of the map or my building so much?

I post 2 videos to understand the problem.

Normal AI: http://youtu.be/OHUz77g3bwo
Weird AI : http://youtu.be/r07J4Wve8Jw

For me it looks like you didnt generated AI (AI - Generate all AI)
User avatar
saberdam
Junior Dev
Junior Dev
 
Posts: 160
Member since: 30.11.2010, 17:20
Likes: 63

Re: Ai Fail + Lua Scripting

Postby saberdam » 12.02.2012, 14:00

For me it looks like you didnt generated AI (AI - Generate all AI)


No i did. This problem is only near the building.
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: Ai Fail + Lua Scripting

Postby Talvipakkanen » 12.02.2012, 14:50

One solution might be placing a forbidden boundary around the whole map. Also, if buildings are brushes, do they have AIRadius set?
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
User avatar
saberdam
Junior Dev
Junior Dev
 
Posts: 160
Member since: 30.11.2010, 17:20
Likes: 63

Re: Ai Fail + Lua Scripting

Postby saberdam » 12.02.2012, 17:23

I put the building as a geom entity. there is no field AIRadius.
User avatar
Hamers
Developer
Developer
 
Posts: 289
Member since: 06.10.2008, 18:38
Location: Berlin, Germany
Likes: 2

Re: Ai Fail + Lua Scripting

Postby Hamers » 13.02.2012, 11:04

If the building has interior and can be entered, build a NavigationModifier around it together with AIPoints, so the Grunt can enter and circle around it at will.

If the building is closed, place a ForbiddenArea around it, so the Grunt doesn't collide with it and navigate around it.

When the problem still persists, post your lua AI code here please (the goal pipes).
Image
Released !!! DOWNLOAD NOW !!!


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community