Author |
Topic: Prevent AI from being alerted |
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
|
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
|
Mystic |
|
General Member Since: Apr 10, 2004 Posts: 6147 Last: Apr 15, 2018 [view latest posts] |
|
|
|
|
|
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
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;
}
}
|
|
|
|
Mystic |
|
General Member Since: Apr 10, 2004 Posts: 6147 Last: Apr 15, 2018 [view latest posts] |
|
|
|
|
|
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
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! |
|
|
|
voidsource |
General Member Since: May 5, 2007 Posts: 1513 Last: Sep 1, 2013 [view latest posts] |
|
|
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.
|
|
|
|
voidsource |
General Member Since: May 5, 2007 Posts: 1513 Last: Sep 1, 2013 [view latest posts] |
|
|
|
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
|
zeroy |
|
General Member Since: Nov 26, 2007 Posts: 1060 Last: Mar 12, 2014 [view latest posts] |
|
|
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.
Thanks to Sparks, it was the first node needed "NO_CHAIN" K/V |
|
|
|