Forums Gallery Downloads LOGIN |REGISTER

Howto make AI melee attack the player

Seeking artificial intelligence? Waypoint queries? Post it here!


 

GDShadow
Just getting started
Just getting started
 
Posts: 12
Member since: 05.04.2011, 10:11
Likes: 0

Howto make AI melee attack the player

Postby GDShadow » 08.11.2011, 00:12

Hi guys,

i need some help setting up an AI Enemy.
What i want is that this enemy runs to the player and attacks him with melee attacks.
So i don't know which commands to use in the flow graph.
Any ideas?

Thx,
Shadow
GDShadow
Just getting started
Just getting started
 
Posts: 12
Member since: 05.04.2011, 10:11
Likes: 0

Re: Howto make AI melee attack the player

Postby GDShadow » 29.11.2011, 13:22

An example flowgraph would still be helpful ;-)
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 09.12.2011, 09:16

Yea,

that would be interesting, I´d like to know that too.
Server Side Modding Support
AndOrXor
Junior Dev
Junior Dev
 
Posts: 178
Member since: 19.08.2011, 10:04
Location: Prague, Czech Rep.
Likes: 1

Re: Howto make AI melee attack the player

Postby AndOrXor » 09.12.2011, 11:30

Best way is to do it in AI behavior otherwise AI will colide with flowgraph. Or if you got AI already supporting melee attacks then in flowgraph remove ranged weapon from inventory and ai should switch to melee attack
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 10.12.2011, 07:54

Okay,

what behaviour would I need?? My grunts only run away from me, but if I go really close they hit me. I need them to attack mindlessly.
Server Side Modding Support
GDShadow
Just getting started
Just getting started
 
Posts: 12
Member since: 05.04.2011, 10:11
Likes: 0

Re: Howto make AI melee attack the player

Postby GDShadow » 13.12.2011, 13:33

DoS wrote:Okay,
what behaviour would I need?? My grunts only run away from me, but if I go really close they hit me. I need them to attack mindlessly.


That's also my problem. Thy just attack when i stand directly in front or beside them. Otherwise they run away...
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 14.12.2011, 17:41

Yea, got that 2.Weird.

Probably gotta "lock" them in some sort of area, then flowgraph them.

Justr don´t know how.I´ll check some of the zombie FG´s available on the internet.

DoS
Server Side Modding Support
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: Howto make AI melee attack the player

Postby the_grim » 14.12.2011, 17:50

Try the different Characters that can be found in the AI's properties. "Cover" is a very cautious character that tries to run away, "Guard" seems more aggressive for example, and "SuperDumb" doesn't really react to the player at all etc. I can't remember right now which one would be the best for an aggressive melee character.
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 17.12.2011, 11:16

Been trying multiple characters, but most of them do even less. They just look at u.
Server Side Modding Support
User avatar
andrey_filantrop
Producer
Producer
 
Posts: 2065
Member since: 25.01.2010, 15:54
Location: Moscow, Russia
Likes: 57

Re: Howto make AI melee attack the player

Postby andrey_filantrop » 17.12.2011, 18:49

Try suitHurricane. Change his behavior to "suit hurricane" also.
Loving God gives you Happiness, Knowledge, Strength and Freedom.
AURAYAMA on Crydev & AURAYAMA in Russia :)
Portfolio: AndreyFilantrop on deviantART
Life by FlowGraph!
savage23
Just getting started
Just getting started
 
Posts: 10
Member since: 26.09.2011, 02:22
Likes: 0

Re: Howto make AI melee attack the player

Postby savage23 » 17.12.2011, 21:09

i did something like this to try to learn the flowgraph and i had the same problem getting the ai to attack me with fists without caring about anything else. i ended up using the ai gotospeedstance node with force ignore all on and aishootat with ignore all too and i looped the aigotospeedstance succeed output to one of the logic any nodes. it works sometimes but i think the ai is kinda buggy other times.
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 18.12.2011, 15:55

Hmm...I´ll try the tip with the suit.

The idea with the FG sounds kinda buggy.
Server Side Modding Support
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 18.12.2011, 16:37

Thanks Andrey, got them moving. It works.

Only prob is that they are a bit slow and to weak.

How can I make them run faster??
Server Side Modding Support
User avatar
andrey_filantrop
Producer
Producer
 
Posts: 2065
Member since: 25.01.2010, 15:54
Location: Moscow, Russia
Likes: 57

Re: Howto make AI melee attack the player

Postby andrey_filantrop » 19.12.2011, 10:29

Sometime ago i wanted to have fun to fight ai on fists. I did the next: Created new items pack with only fists, gave it to suithurricane ai (get him as entity/grunt and provide analogic to archetype nanosuit params), increased attack range, FOV, reaction and something else in ai params. Change its behaviour to suithurricane too. After it i made fg which manage ai to ai/execute/sprint_combat to player (if player is in range more than say 2 m from ai) and stopped his running when in range less than 2 m. So way ai behaved himself as natural as he may behave himself according to default Crysis settings without changing any melee attack params of this character. He always runned to me by fg, stopped near me by fg and attacked cause of his character. More advanced scheme may be created using scripts editing or even game code, but i didnt do it with melee ever.
Loving God gives you Happiness, Knowledge, Strength and Freedom.
AURAYAMA on Crydev & AURAYAMA in Russia :)
Portfolio: AndreyFilantrop on deviantART
Life by FlowGraph!
User avatar
DoS
Developer
Developer
 
Posts: 273
Member since: 04.12.2011, 13:56
Location: East Sussex, United Kingdom
Likes: 7

Re: Howto make AI melee attack the player

Postby DoS » 19.12.2011, 17:45

Thanks, I´ll try that.

What do u mean with following sentence: get him as entity/grunt and provide analogic to archetype nanosuit params ??

I don´t really want to start messing with scripts or game code, especially as changing the CryEngine isn´t allowed( i think)

DoS
Server Side Modding Support


 
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