View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Beginner BeginnerMember since: 12.01.2011, 12:07Posts: 34Location: The Netherlands Likes: 0
 

 Post Topic: Ai and Voxels/Caves
PostPosted 19.01.2012, 11:19 
hello guys!
Has anyone encountered the next problem? I made a nice cave in a hill on top of wich a couple of grunts are keeping watch. When I spawn into the cave the grunts are starting to attack me because the can see me through the terrain! :rolleyes: I put some flat concrete structure on top of the ceiling of the cave so now they cannot see me anymore, but they still hear me running through the cave so they start searching....... Furthermore, I can hear them also and see their shadows (?): how can I stop the terrain enviromentssounds in the cave area?
Can this be solved?
Thanks!

User avatar   Uber Modder Uber ModderMember since: 25.01.2010, 15:54Posts: 2053Location: Moscow, Russia Likes: 57
 

 Post Topic: Re: Ai and Voxels/Caves
PostPosted 21.01.2012, 19:46 
Using visareas, voxel shadows enabling, fg support of ai/ignore while player is inside the cave may help a bit. :)


Loving God gives you Happiness, Knowledge, Strength and Freedom.
AURAYAMA on Crydev & AURAYAMA in Russia :)
Portfolio: AndreyFilantrop on deviantART
Life by FlowGraph!
User avatar   Beginner BeginnerMember since: 12.01.2011, 12:07Posts: 34Location: The Netherlands Likes: 0
 

 Post Topic: Re: Ai and Voxels/Caves
PostPosted 22.01.2012, 00:29 
Many thanks Andrey, good suggestions! I will try them all and post the results here!
User avatar   Beginner BeginnerMember since: 12.01.2011, 12:07Posts: 34Location: The Netherlands Likes: 0
 

 Post Topic: Re: Ai and Voxels/Caves
PostPosted 23.01.2012, 13:54 
Well, voxel shadows was easy: stupid from me to miss that setting in Voxels....... :cheesy: Visareas make it all black (off course), Ai ignore is just not what I wanted: using the AinavigationModifier they can enter the cave en chase me there...... What I did was lower the AudioScale of the involved Ai to 0.5: Now they do not hear me anymore when I am in the cave, only when I make more than usual noise.... ;) , and when on top of the hill they cannot see me because of the concrete floor above the ceiling of the cave (is this the right solution??? :unsure: )
Next problem: preventing the tendency of the Ai to climbing the walls of the cave....... (using ForbiddenArea?)
User avatar   Superstar Dolphin Superstar DolphinMember since: 16.08.2004, 10:46Posts: 9879Location: Finland Likes: 185
 

 Post Topic: Re: Ai and Voxels/Caves
PostPosted 23.01.2012, 14:00 
Use the AINavigationModifier to prevent the AI from running into walls; the correct way is to enclose the entire cave (or a building, same principle) with a ForbiddenArea, and then drawing an AINavigationModifier enclosing all the areas the AI can walk in. Add AIPoints inside the AINavigationModifier so the AI characters can navigate through the area. :)

The documentation goes through Forbidden Areas and Nav modifiers in great detail: http://doc.crydev.net/SandboxManual/SimpleAI.html - although the AIPoint placement isn't optimal in the example pics (in the official docs!). Basically the AI can navigate within the NavigationModifier even without AIPoints, so you don't need to put them every meter or so. You should place an AIPoint at locations where the AI hasn't got a straight path from point A to B within the Nav modifier (for example corridor corners) so when the AI finds himself in a closed corner he always has a STRAIGHT unobstructed path to the nearest AIPoint. ;)

A square room for example would only need AIPoints in the entrance and exit locations. From every corner of the room the AI can find a direct path to the entrance. ;)


Last edited by the_grim on 23.01.2012, 14:06, edited 2 times in total.
User avatar   Uber Modder Uber ModderMember since: 25.01.2010, 15:54Posts: 2053Location: Moscow, Russia Likes: 57
 

 Post Topic: Re: Ai and Voxels/Caves
PostPosted 23.01.2012, 14:05 
Ai-ignore must be changed to ai-hostile when player is in the entrance zone where ai can hear him if in real life. Forbidden area - is an exact tool to prevent from climbing yes, just press ai-generate-all-navigation after setting if. Audioscale - lol ai are getting new option, not only stupid for today, but now also deaf. :)

Edited: and it doesnt really matter, that Grimmy posted 0,5 sec before me


Loving God gives you Happiness, Knowledge, Strength and Freedom.
AURAYAMA on Crydev & AURAYAMA in Russia :)
Portfolio: AndreyFilantrop on deviantART
Life by FlowGraph!