Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 64 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: World at War
Category: CoDWW SP Mapping
Call of Duty: World at War single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Prevent AI from being alerted
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Monday, Jan. 10, 2011 11:47 am
So i have a 2 patrollers setup and 2-3 idle guards AI in my level. Problem is, when i kill (using one of the patroller - away from direct line of sight from the Other AI - everyone comes over to me!

I saw an option "ENEMYINFO" on the Actor K/V properties, is that the one controlling such behavior? If not, how can i prevent them from being alerted at any shots fired?

Note: I use the _stealth functions on AI and Player.
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 01:29 pm
Anyone?
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 01:49 pm
If you check 'ENEMYINFO' the AI will get a snapshot of exactly where the player is, probably the oposite of what you need. You could try setting the ai to pacifist, i also think there is a way to set there 'detect radius' via script, i used it before but cannot find the code i used, havea little search you should be able to turn something up.

Also are you sure you are calling the stealth_logic script correctly? This should limit the AI behavior and detection distance anyway, in CoD4 i set a building using stealth logic and was able to enter each room without alerting the any other areas of the house just using stock scripts.
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 01:58 pm
Mystic writes...
Quote:
If you check 'ENEMYINFO' the AI will get a snapshot of exactly where the player is, probably the oposite of what you need. You could try setting the ai to pacifist, i also think there is a way to set there 'detect radius' via script, i used it before but cannot find the code i used, havea little search you should be able to turn something up.

Also are you sure you are calling the stealth_logic script correctly? This should limit the AI behavior and detection distance anyway, in CoD4 i set a building using stealth logic and was able to enter each room without alerting the any other areas of the house just using stock scripts.


Thanks, ill uncheck that ENEMYINFO then and see. Here is what i have currently for those AI dudes:

Code:

guardidle1()
{
	aGuard1 = getentarray("guard1_idle","targetname");
	aGuards1 = [];<br />
<br />
	for (i=0; i < aGuard1.size; i++)
	{
		guardidle = aGuard1[i] dospawn();<br />
<br />
		if (spawn_failed(guardidle))
			return;<br />
<br />
		guardidle maps\_stealth_logic::stealth_ai();
		guardidle.old_maxsightdistsqrd = guardidle.maxsightdistsqrd;
		guardidle.maxsightdistsqrd = (400*400);
		guardidle.ignoreme = true;
		guardidle.ignoreall = false;
		guardidle.pacifist = false;
		guardidle.dontavoidplayer = false;
		guardidle set_battlechatter(true);
		aGuards1[i] = guardidle;
	}
}


Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 05:17 pm
Have you made the path for the patrollers close to each other? Looks like you have there sight distance at 400 units, maybe try tweaking this a little.

You say your waiting till they are out of sight from the other patrollers but remember the ai will see through models or detailed brushes (just tested it) so you will need to engage them atleast 401 units away or surrounded by structural brushes.

Also i notice your script doesn't make your AI pacifist, have you tried that yet?
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 05:30 pm
Mystic writes...
Quote:

Also i notice your script doesn't make your AI pacifist, have you tried that yet?


I suppose 400 units may be too much... I just tried pacifist but now they ignore me all toghether, even when shot!
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 06:54 pm
off of cod4, mission ambush, this is wat i got and how they made a patroller ignore the player and other ai's:




in radiant:




Larger view link



in script:
Code:

main()
{ ......
	array_thread( getentarray( "checkpoint_guy", "targetname" ), ::add_spawn_function, ::checkpoint_guy );
	scripted_array_spawn( "checkpoint_guy", "targetname", true );.......
}
Code:

checkpoint_guy()
{
	self endon( "death" );

	if ( isdefined( self.script_aigroup ) && self.script_aigroup == "tower_guy" )
		self setflashbangimmunity( true );

	self setthreatbiasgroup( "oblivious" );

	flag_wait( "takeover_force" );

	wait 0.5;

	self setthreatbiasgroup( "axis" );
	self.fixednode = false;
}





so it seems to me they used threatbiasgroups.

as for them ignoring u, set it so that they dont ingore u after x, event. U could use death flags on each individual and then set it so it waits for 2 flags or 3 or as many as u like and then set their ignoreme to false. thus helping u much more better.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 06:57 pm
dang i just realized zeroy, this was suppose to be for ur other post on the ai's using the defined path in radiant. ^ ^ my bad.
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 07:28 pm
voidsource writes...
Quote:
dang i just realized zeroy, this was suppose to be for ur other post on the ai's using the defined path in radiant. ^ ^ my bad.


Thanks, it clearly shows that linking first node with last should work so ill study that. [jumping]
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoDWW SP Mapping
Posted: Thursday, Jan. 13, 2011 09:58 pm
zeroy writes...
Quote:
voidsource writes...
Quote:
dang i just realized zeroy, this was suppose to be for ur other post on the ai's using the defined path in radiant. ^ ^ my bad.


Thanks, it clearly shows that linking first node with last should work so ill study that. [jumping]


Thanks to Sparks, it was the first node needed "NO_CHAIN" K/V
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW SP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»