View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Make AI attack player with fists
PostPosted 29.09.2011, 19:58 
Hey

I tried to make some ai attack me with the fists.
i gave them an equipment pack, that they only have fists.
but instead of attacking me they run away.
or if i just make them follow me they follow me and attack me. but if i shoot at them they run away and then they come back to follow me again.

i need help to fix, that they run away.

they have just to run to me and attack me till i am death

thx

User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 30.09.2011, 03:58 
See what you do is go to the Ai setup and look for the box marked "Courage" and set that to 100....

No but really, I think you need to make them ignore gunfire from the flowgraph, and set their character to something different, like a nanosuit profile.
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 30.09.2011, 14:25 
hmmm..
then how do i make them ignore gunfire. i know to make them ignore me, but thats the wrong way i think ;)

i thought perhaps i could change the ai behaviour to "dump" but when i changethe behaviour (and that happens with most of the behaviours when i change them)
they just stand still and do nothing...
what am i doing wrong?
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 01.10.2011, 21:57 
Whenever you change the profile of an AI, you must click the RELOAD SCRIPT button at the bottom of the ai setup to apply any changed you made to the AI
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 02.10.2011, 15:52 
yeah i know.

but the bot doesn't do anything. he stands there ignores everything and just look at me. sometimes he sits down. but does nothing.
that happens with all behaviours except the "Job_StandIdle"
is that strange? or is there a mistake? :unsure:

perhaps there is a workaround.
if i make the bot ignore me he follows me but doesn't attack me (which is logic^^)
is it posible to disable the ignore function when the bot is near by me, to attack me?
but then i think he will start running away again...

or how do i make the bots ignore gunfire?
i think thats the key question...

thx for your help so far.

when i change character it's the same by the way.

is thet perhaps because i use already existing chars?
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 03.10.2011, 03:59 
Okay, I need a bit of info here.
What AI are you using? Is this a Grunt? or an actual soldier?
Make sure they have species hostility set to true, and check that their AI behavior profiles are set to something aggressive.
In Sandbox 2, we ran into the common problem of many of the profile simply being unfinished and therefore useless. I don't think this is a prevalent problem in Sandbox 3 so any profile should work, given it is NOT Alien, and not something that refers to items.

One other thing, in my experience in both CE2 and CE3, I never saw an enemy attack me solely with their fists. Melee with weapon, sure, but never fists. Are you sure they do this in CE3?
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 03.10.2011, 10:53 
I am using a grunt follower
species hostility is set to true
And i am using CE2. I haven't found an agressive behaviour that worked, yet -.-

here is a video how far i came.
and what problems i have.

hope it helps to understand my problem.
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 03.10.2011, 19:27 
So it seems you have him attacking you with his fists. Thats a good start. I think there's a flowgraph node that allows you to set his combat state. Check under AI functions, should be the top of the list.
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 05.10.2011, 12:12 
what exactly do you mean with "combat state" ?
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 06.10.2011, 04:21 
Well, Ai operate under certain combat states, which dictate their behavior. I am not near my machine at the moment so I'm afraid I can't provide a better explanation.
Basically, whatever state your grunt is operating under when he attacks you is what you need him to retain. Perhaps if you used the flowgraph to check his current state and loop that to his set state, you can keep him in attack mode even when you shoot him. Again this is all in the flowgraph under AI
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 06.10.2011, 18:33 
i think it's a bit strange, that the bot starts following me again after i shot at him although i have no loop in fg...
that fact makes me think, that his action isn't really stopped for a moment.

but i'll try your suggestion.
with states of attack i remember the states like idle, alerted and combat.
or are there some substates for combat ?

thx for help so far ;)
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 08.10.2011, 00:58 
I would suggest using a check state node on the grunt when the mission starts. The output should be looped to a set state node. I believe this should hold up under gunfire, but if it doesn't use, an ai alerted node and loops its output into that set state node I mentioned earlier. You may need a logic gate for this.
Let me know how it goes, I am interested.
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 14.10.2011, 18:57 
you mean to check the state with AI:AICheckStates?
but i need a Pattern then I think. what pattern should i take?
and then to loop
AI:AISetState? but which state i should choose?

when i click on the "..." of the AI:AISetState "State" there is an error...
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 2974Location: Glorious Texas Likes: 254
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 14.10.2011, 19:27 
Okay an error like that is usually caused by improper use of the node.
I always saw these when I accidentally tried to use an AI:anim node on an animobject. Check that A) The Ai is the proper kind. Maybe try with other AI to isolate the problem. B) make sure there is an entity assigned to the node before you open the dialog menu.

It doesnt matter what pattern it takes. What you need is to get the state he is in when he attacks you. obviously his state is changing when you shoot him, forcing him to flee. Use that value and feed it into the SetState node, effectively locking him into that state. Of ocurse you could also edit his AI at the base level, but that requires some technical know-how.
  Beginner BeginnerMember since: 26.08.2011, 17:00Posts: 9 Likes: 0
 

 Post Topic: Re: Make AI attack player with fists
PostPosted 15.10.2011, 17:27 
k i know what you want.
but how do i check the state of the ai?

i only found the AI:AICeckStates and the AI:AISetState.
but the ai:check only gives boolean.
to feed the ai:set i need a state and not a boolean.

Image