AI Hunt Down Player
Moderator: Moderators
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
AI Hunt Down Player
Hi I was wondering if it is possible to get the Enemy AI to just come after and hunt down the player kinda like zombies.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: AI Hunt Down Player
Well that depends: do you want the player to be the solo unit on a team (no A.I. on the player's team) or do you want him to have A.I. allies on the same team?
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
Well for my Project it has the player and a couple other AI allies against the enemy AI. I would just like the enemy AI to hunt down the player and not stop to capture command posts or do other things
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: AI Hunt Down Player
Here's something from the Kashyyyk campaign script that could help you:
Just change CIS to the team name you want to do the hunting, the 10 to an 100 to get all the AI on the team to do this goal, and woodl to the unit being hunted down. I'm not sure if this will work on units, though, but it's worth a try.kas2c_c wrote:Code: Select all
AddAIGoal(CIS, "Destroy", 10, "woodl")
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
Were would I put this in a my conquest maps LUA and what did you mean by change woodl to the unit being hunted down. Would I have to put in a specific name like the players or the unit that the player is playing as like a stormtrooper? EDIT: Ok so I got it to kinda work. The AI come after me but they still wanted those CPs so I removed the capture regions on the CPs on the stock Death Star map and now its like Hero Assault. Some are hunting most are standing around day dreaming. If I need to post my LUA I will.
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: AI Hunt Down Player
Yes, please post your LUA.
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
Hidden/Spoiler:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: AI Hunt Down Player
It matters if this is for single player or multi-player; which is it?
For SP
For SP
- 1) First use ClearAIGoals(<team number>) to clear any existing AI goals from which ever teams you want to attack the player
- 2) When the player spawns (first time only), use AddAIGoal(<team>, <goal type>, <weight>, <object>).
- Use the Follow goal type to have the AI run after the player.
- The weight doesn't matter unless you add in more AI goals for that team. Have it above zero.
- The object should be the player's character id or the player's unit object. For SP, the human's character id is always the number zero.
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
Thank you for the help the AI do come after the player now. Ive got two more questions (1 how would I stop the Wampas from jumping off the platforms. You can see my problem here http://www.xfire.com/video/4b15ed/ The stormtroopers are the smart ones :stormie:) (2 how would I add the Acklays scream to the whole Alliance team thanks.)
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: AI Hunt Down Player
1: Notice how the Wampas are all jumping In the same spot? That Is because there Is a jump hintnode placed there In ZE. Simply go In ZE and take It out to fix this. (For more info on hintnodes, click Here
2: Please explain this a bit more. How are you trying to add the scream? To one unit?
2: Please explain this a bit more. How are you trying to add the scream? To one unit?
- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
Im trying to give the scream to all the units on the Rebels team so every time they would get shot or would say random words on the battlefield all you would hear is the Acklay scream.
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: AI Hunt Down Player
This should do it, but I'm not that sure..(It works for me
First, load up the Acklay side In your LUA.
Second, look at the odf geo_inf_acklay In BF2_ModTools/assets/sides/geo/odf. you should see these lines..
I think "acklayhurt" would be a scream.
Now, try this to get the sound working.
In all_inf_default, change these lines
To this
This will make the units sound like the acklay then they get hurt or die. About the other sounds I'm not that sure. Anyone know how to make all sounds the acklayhurt sound?
First, load up the Acklay side In your LUA.
Hidden/Spoiler:
Hidden/Spoiler:
Now, try this to get the sound working.
In all_inf_default, change these lines
Code: Select all
HurtSound = "all_inf_com_chatter_wound"
DeathSound = "all_inf_com_chatter_deathCode: Select all
HurtSound = "acklayhurt"
DeathSound = "acklaydie"- SpartanA259
- Captain

- Posts: 498
- Joined: Tue Jul 19, 2011 2:47 pm
- Projects :: Orion City
- xbox live or psn: Steam: [404] Ash
- Location: New Reno, Nevada
Re: AI Hunt Down Player
I tried that but I dont really know how to set up the sounds...
In other news I have a couple questions so here they are:
1- How would I set up a blaster rifle to shoot like a pistol in one hand but fire like a blaster rifle.
2- How would I give the wampa animations to the Stormtroopers I read through the tutorials but they were a bit confusing. By the way im new to setting up new animations.
3- Is there some way to take the arm off a stormtrooper at the elbow down?
Thanks for all the help so far :stormie:
In other news I have a couple questions so here they are:
1- How would I set up a blaster rifle to shoot like a pistol in one hand but fire like a blaster rifle.
2- How would I give the wampa animations to the Stormtroopers I read through the tutorials but they were a bit confusing. By the way im new to setting up new animations.
3- Is there some way to take the arm off a stormtrooper at the elbow down?
Thanks for all the help so far :stormie:
