Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

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

 Post Topic: Ai Fail + Lua Scripting
PostPosted 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

  Junior Dev Junior DevMember since: 19.08.2011, 10:04Posts: 178Location: Prague, Czech Rep. Likes: 1
 

 Post Topic: Re: Ai Fail + Lua Scripting
PostPosted 12.02.2012, 11:04 
Quote by saberdam:
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   Junior Dev Junior DevMember since: 30.11.2010, 17:20Posts: 160 Likes: 63
 

 Post Topic: Re: Ai Fail + Lua Scripting
PostPosted 12.02.2012, 14:00 
Quote:
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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: Ai Fail + Lua Scripting
PostPosted 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   Junior Dev Junior DevMember since: 30.11.2010, 17:20Posts: 160 Likes: 63
 

 Post Topic: Re: Ai Fail + Lua Scripting
PostPosted 12.02.2012, 17:23 
I put the building as a geom entity. there is no field AIRadius.
User avatar   Developer DeveloperMember since: 06.10.2008, 18:38Posts: 289Location: Berlin, Germany Likes: 2
 

 Post Topic: Re: Ai Fail + Lua Scripting
PostPosted 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 !!!