Sandcrawler Network

Unreal Modder's Haven => Unreal Engine 2 General Modding Chat => Single Player Level Design => Topic started by: Hybrid_Soldier196 on October 22, 2006, 06:17:19 PM

Title: How to make AI only see Player as Enemy
Post by: Hybrid_Soldier196 on October 22, 2006, 06:17:19 PM
In this tutorial you will find out how to make any pawn (i hope, because i only tried with the Droideka, but in theory it should work) recognize only the player as the enemy, not other pawns of the same type.
----------
Step 1
----------
Load up your favorite map, or one you want to add pawns to, and select a pawn to use. Place as many as you want onto the map. Right click on your pawn, scroll to select, and then "All (whatever pawn you picked)" Right click again to go to "Actor Properties"

----------
Step 2
----------
On the "Actor Properties" list find {Hidden} as diagramed in pic below.

(//http://i96.photobucket.com/albums/l163/hybridsoldier196/T_00.jpg)

----------
Step 3
----------
In the list under {Hidden} scroll down to "bValidEnemy" and change the value to "False" as diagramed in the pic below.

(//http://i96.photobucket.com/albums/l163/hybridsoldier196/RC%20Pics/Tutorial%20Pics/T_01.jpg)

----------
Step 4
----------
Build All (i dont think this is nessecary but what the heck, do it to be safe) and save the map.

When the map loads get ready!!! There aware of your presence!!! :shock:

(//http://i96.photobucket.com/albums/l163/hybridsoldier196/RC%20Pics/Tutorial%20Pics/T_02.jpg)

Carefull!! They do shoot back......

(//http://i96.photobucket.com/albums/l163/hybridsoldier196/RC%20Pics/Tutorial%20Pics/T_03.jpg)

with incredible accuracy!!!

(//http://i96.photobucket.com/albums/l163/hybridsoldier196/RC%20Pics/Tutorial%20Pics/T_04.jpg)

Enjoy!!
Title:
Post by: Delta_96[DeltaSquad] on October 22, 2006, 08:14:00 PM
thanlos i couldnt figure that out for my own map now i can put some annoying battle droids on there
Title:
Post by: Delta_96[DeltaSquad] on October 23, 2006, 07:05:24 AM
i was looking through the stuff under hidden and i was wondering what the owner things were about and what do they do
Title:
Post by: Hybrid_Soldier196 on October 23, 2006, 09:35:36 AM
Just experiment....but remember to try 1 thing at a time, otherwise you wouldnt know what did what.
Ill post more tuts if i find anything else useful.
Title:
Post by: Delta_96[DeltaSquad] on October 23, 2006, 09:37:56 AM
yeah i learned that the hard way
Title:
Post by: DooFi on October 23, 2006, 09:38:40 AM
awesome. I've been searching for this option (although i personally dont like putting pawns in my maps :P). I'm currently making it fit the mod site. Do you think we need bigger pics? Then I'd make popups like in my collision tut.

(//http://img45.imageshack.us/img45/9535/somepicwx0.jpg)
Title:
Post by: Hybrid_Soldier196 on October 23, 2006, 09:45:07 AM
Actually the pics are kinda small :mrgreen: but to the point.
Title:
Post by: Squad_Sammaron on October 23, 2006, 01:06:21 PM
true i don't see the issue...unless your doin multiple types of enemies. dont think it'll work then. by that i mean trando's will shoot droids. wat i dont get is the team index...y doesnt that work...*pondersome pose :D*
Title:
Post by: Squad_Sammaron on October 23, 2006, 01:51:26 PM
i'm so dumb :D ends up all you gotta do for that (or a much harder way than hybrid thought) is to add an AI script to the people and add a sequence with 'ACTION_SetThreat'. then just add the tag of your new friend and set the bThreat or w/e to false. all done :D
Title:
Post by: Hybrid_Soldier196 on October 23, 2006, 03:22:14 PM
Actually if you follow the tutorial and add any pawn, say clone troopers, they will only attack the player...NOT each other. I know.....I tried. :mrgreen: but the script probably works too, but i want to keep it simple and so my way works, at least the way I want it too.
Title:
Post by: Squad_Sammaron on October 23, 2006, 03:50:55 PM
o yea oops :D i thought they would still attack other enemy pawns :D
Title:
Post by: Hybrid_Soldier196 on October 23, 2006, 05:43:40 PM
you learn something new every day :lol:
Title:
Post by: Squad_Sammaron on October 24, 2006, 03:27:43 PM
hey doofi isn't there a tut that says enemies always attacks you? that'd need to be changed
Title:
Post by: DooFi on October 26, 2006, 06:22:00 AM
This tutorial on adding AI only says "There are numerous other tweaks you can make to the settings (especially if you don't want the Droids to attack each other - lol)". So i guess we could change it into "consult Hybrid_Soldiers tut on AI enemy recognition" or something.. I'm going to ask sandy to do that. (//http://sandcrawler.net/rcmod/tutorials/11.html)
Title:
Post by: Hybrid_Soldier196 on October 26, 2006, 12:47:14 PM
Sounds good.
Title:
Post by: Darktrooper on November 06, 2006, 08:57:46 AM
Thanks for the PM Hybrid. I'm gonna start on this today. I've got more projects going than I can handle right now, but I've been wanting to get this type of stuff off the ground for a long time. Have to see what happens.
Title:
Post by: Hybrid_Soldier196 on November 06, 2006, 09:46:02 AM
No problem Darktrooper.

I had this crazy idea that maybe someone can convert most of the singleplayer into multiplayer coop maps. Do you think this is possible? I mean couldnt we use my tut and change all the enemies to obey that? Is it legal? What does everyone think?
Title:
Post by: Darktrooper on November 06, 2006, 10:47:12 AM
LOL! We did it in F.E.A.R. and I'm trying it now as we speak. I'll post some screenshots if it works. What would need to be done is that you add more player start points, remove the deltas, change all the pawns to fit the format you mentioned, and save the game as a DM; say DM_Geo_01b. Theoretically it should work. Like I said, I'll post some screenshots of what I'm trying now.
Title:
Post by: Darktrooper on November 06, 2006, 12:00:09 PM
Arramus and I tried to use Geo_01C. I was able to start the game, but he wasnt able to join via LAN. We didnt try normal Internet. You have to change the Level properties for SP to MP and I noticed that the bacta dispensers, squad hot keys, and the like dont work. So it may have to be alot of rebuilding of SP maps, adding MP things like bacta tanks, weapons, and such. I'd advise just building custom maps for COOP versions. I'll open a new topic area for this specific game set. Maybe Arramus and I can talk to a few of our FEA COOP mappers, see if we cant get some coding done for it as well. :wink:
Title:
Post by: Delta_96[DeltaSquad] on November 06, 2006, 12:16:14 PM
youd need to fin out how to make the turrets work in Multi, romove bacta single and add bacta pcaks from multi, weaken the enemys since they will tear you apart, and put in more spawn points possibly change the weapons
Title:
Post by: Hybrid_Soldier196 on November 06, 2006, 04:37:33 PM
What we could with this is MAJOR battles on a grand scale of....of...TONS of troops!
Possibilties are endless...... :wink:
Title:
Post by: Dagger on November 07, 2006, 12:16:38 AM
This is truly a breakthrough in cutting a little into RC's cryptic and often primitive AI. I will definitely have to keep up on this - keep up the good work, folks!
Title:
Post by: Squad_Sammaron on November 07, 2006, 12:25:02 PM
QuoteYou have to change the Level properties for SP to MP and I noticed that the bacta dispensers, squad hot keys, and the like dont work. So it may have to be alot of rebuilding of SP maps, adding MP things like bacta tanks, weapons, and such.
first off, you're right. tons of rebuilding. probly too much. if you open the map from a SP map, you can use squad controls and stuff but when opend from mp you can't. no idea how this works :D about the bacta dispensers, i think it should'nt be to hard to make an MP one. also, changing pwns wouldn't be a prob.
Title:
Post by: Hybrid_Soldier196 on November 23, 2006, 05:00:26 PM
Can one of the admins please change the title of this topic to

How to make AI only see "Player" as "Enemy"

its really getting on my nerves that i typed it wrong in the first place. :lol:
Title:
Post by: Hybrid_Soldier196 on November 29, 2006, 10:00:21 AM
please?
Title:
Post by: arramus on February 26, 2007, 07:10:53 PM
A little late but I don't think you made a spelling mistake as adding " to the end is converting into its text coding. I removed the " marks.

Nice find on the AI and I'm going to have some good fun experimenting from hereon.
Title:
Post by: CLONECOMMANDER501 on March 17, 2007, 05:56:52 AM
Hmm, is it possible to make certain AI see the player as an ally? I am making a Muunilist map and I want clones to help destroy the never ending army of droids.
Title: Re: How to make AI only see Player as Enemy
Post by: ubernoob on May 22, 2009, 05:54:27 PM
The idea of allying AI with human players in MP seems awesome! Still, we'd also need to ally enemy AI, so i.e. human players & clones shoot trandos & droids, while trandos & droids shoot both human players & clones.
Title: Re: How to make AI only see Player as Enemy
Post by: metadude1234 on April 30, 2010, 04:10:30 PM
this helped heaps for my new map that's in the making