View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Beginner BeginnerMember since: 26.10.2011, 02:56Posts: 23Location: Belgium Likes: 0
 

 Post Topic: AI in vehicles: how do I make them act interestingly?
PostPosted 06.01.2012, 20:15 
Hey guys,

Today I've been messing around with the sample vehicle assets that you can find on the download page of crydev. So what I did was I placed an Abrams tank and a Grunt AI, and managed to let the Grunt get in the vehicle and drive along a simple path.

Very cool! However, after the Grunt has finished driving along the path, he seems to be completely unaware of his surroundings. When I shoot the Abrams tank the Grunt does not respond, as if I am not there.

Now, what I assume is going on is that the grunt behaviour simply isn't set up to deal with fighting in a vehicle. Is this the correct assumption? And if so how would I go about creating more interesting behaviour for the Grunt?

Thanks!


Image

User avatar   Beginner BeginnerMember since: 26.10.2011, 02:56Posts: 23Location: Belgium Likes: 0
 

 Post Topic: Re: AI in vehicles: how do I make them act interestingly?
PostPosted 07.01.2012, 16:29 
On further investigation my assumption does indeed seem to be true. I noticed that the AI inside the tank would sometimes shoot when the canon was pointed directly at an enemy, but else it wouldn't shoot. So now I guess I need to enhance my AI behaviour to turn the canon and seek targets once the AI is in the tank. Any tips or a small tutorial on doing this would be greatly appreciated! I'd look at the Crysis 2 assets but unfortunately I do not have that game nor the sandbox that came with it :(


Image
User avatar   Beginner BeginnerMember since: 26.10.2011, 02:56Posts: 23Location: Belgium Likes: 0
 

 Post Topic: Re: AI in vehicles: how do I make them act interestingly?
PostPosted 11.01.2012, 21:13 
Still need a poke in the right direction with this.
Thanks.


Image
User avatar   Trained Modder Trained ModderMember since: 06.10.2008, 18:38Posts: 289Location: Berlin, Germany Likes: 2
 

 Post Topic: Re: AI in vehicles: how do I make them act interestingly?
PostPosted 12.01.2012, 10:16 
You should place a driver and a gunner in your vehicle.

The gunner always fires automatically at enemies, if the vehicle has a gunner weapon like a MG.
If you also want the driver to shoot and drive automatically, you have to code new AI behaviour.

Look here: http://freesdk.crydev.net/display/SDKDOC5/AI+Scripting

I don't know if it's implemented in the free SDK, but for Crysis there is the behaviour TankClose for tanks, which you can use in conjunction with an AI>Signal FG node to make the tank drive back and forth on a specific path and shooting the player with the main cannon.


Image
Released !!! DOWNLOAD NOW !!!
User avatar   Beginner BeginnerMember since: 26.10.2011, 02:56Posts: 23Location: Belgium Likes: 0
 

 Post Topic: Re: AI in vehicles: how do I make them act interestingly?
PostPosted 12.01.2012, 13:18 
Thanks Hamers.
I just remembered I still have Crysis 1 laying around, perhaps I'll reinstall it and have a look at it's AI behaviours and learn by example :)


Image