Enemy soldier scripting
Re: Enemy soldier scripting
I'm looking for this too. Trying everything. I'll post if I get something working.
Re: Enemy soldier scripting
I want the simplest script possible that:
1) Can detect if the player is running or shooting, then determine the distance to the AI and cause AI to react if the player is too close
2) When the AI reacts to the player, it monitors its life. If its life is less than 75%, it finds cover/hides, if its life is less than 50%, it runs away/gets backup
3) Gets backup if it finds more than one other AI dead
4) Does everything the default AI does
Can this be done simply?
1) Can detect if the player is running or shooting, then determine the distance to the AI and cause AI to react if the player is too close
2) When the AI reacts to the player, it monitors its life. If its life is less than 75%, it finds cover/hides, if its life is less than 50%, it runs away/gets backup
3) Gets backup if it finds more than one other AI dead
4) Does everything the default AI does
Can this be done simply?
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
Re: Enemy soldier scripting
Nope, it's setup.bernie wrote:If you use perfectai script Next Order would be FindPointOrder;
Look for something similar in genericai.
Pointsetup maybe?
Personally I would always use perfectai because it covers all situations much better than genericai. It's much easier to adapt to your own needs I think.
I used setup, and it worked fine.
Bernie, I think paradox picked something up from your sig.
LOL
It was not Possible to determine the dimensions of the image....
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Re: Enemy soldier scripting
it can be done. it depends on the amount of experience you have.dylanwinn wrote:I want the simplest script possible that:
1) Can detect if the player is running or shooting, then determine the distance to the AI and cause AI to react if the player is too close
2) When the AI reacts to the player, it monitors its life. If its life is less than 75%, it finds cover/hides, if its life is less than 50%, it runs away/gets backup
3) Gets backup if it finds more than one other AI dead
4) Does everything the default AI does
Can this be done simply?
1) Yeah use this variable self.player_range
2) well you have to use script points for this. in your level add retreating and cover paths then set them when var life is below 75 etc
3) you have to use GetAttribute command to get the health of other allies. if theyre less than 1 make it follow retreat scriptpoint
4) just add those to the default ai
Herp derp.
-
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
Re: Enemy soldier scripting
All the suggestions that have been posted are good ones but they are things that I have already tried.
It doesnt matter to me what script that I use. I am only interested in getting the pawn to patrol and then shoot at the player when the pawn sees the player. I have been banging my head and pulling my hair trying to get it to work. Thanks for the efforts.
Is there anyone that could post an html tut on the subject? I don't have internet at home right now so I can't DL any archive files. I have to use a public terminal and write down what I need.
It doesnt matter to me what script that I use. I am only interested in getting the pawn to patrol and then shoot at the player when the pawn sees the player. I have been banging my head and pulling my hair trying to get it to work. Thanks for the efforts.
Is there anyone that could post an html tut on the subject? I don't have internet at home right now so I can't DL any archive files. I have to use a public terminal and write down what I need.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
Re: Enemy soldier scripting
Gimme your model, I'll make a level, add the pawn, and set things up for you.
It was not Possible to determine the dimensions of the image....
-
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
Re: Enemy soldier scripting
Thanks for the offer vrageprogrammer. I simply used the virgil model. You should have that already. As I said before. I do not have a way to DL anything right now. I am using a coffee house terminal to access the net. I hope to have access at home soon though.vrageprogrammer wrote:Gimme your model, I'll make a level, add the pawn, and set things up for you.
An html tut would be sooo much more helpfull. That way I could print it off and pay the per page fee and then take it home and follow it. Other people would be able to use it to.
There is an example level where the robots are following a path and the object is to get past them without being seen.
I have set my pawn and script points up using the example level as a template. Im not sure if another example will help me.
If there were detailed instructions however, that might make a difference.
I really appreciate all the help that you all have offered.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
Re: Enemy soldier scripting
k, one HTML tut coming up~
It was not Possible to determine the dimensions of the image....
-
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
Re: Enemy soldier scripting
I finally did get my pawn to patrol and then attack the player when the player is seen. The key was indeed using the perfectai.s.
The other scripts that I was using just didnt cut the muster it seems.
Thanks for all the really great input.
The other scripts that I was using just didnt cut the muster it seems.
Thanks for all the really great input.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.