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

Members Online

0 Active | 153 Guests


Mohaa maps on Cod2?
CoD2 MP Mapping
is this place alive?
CoDBO3 Mapping
Call of DutyŽ: WWII
CoD WW2 General


CoD Mapping
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Scripting 101 - Pacify AI
Versions: You must be logged in to view history.
BR3NT explains how to pacify AI
In your SP levels you sometimes need to 'Pacify' or make friendly you ai Actor's.
This applies to both Allies and Axis soldiers. As one entity or an array.


var = true; or false;

Like everything else, there are a few ways to execute this function on Ai.
It Can Be Used On:

a) A single entity.
b) A group of entities.
c) Allied and axis specific.

A Single entity:


ent = getaiarray("ent_name", "targetname");
ent.pacifist = true;

An Array Of Entities:


ai_array = getentarray("array_name", "targetname");
for(i = 0; i < ai_array.size; i++)
ai_array[i].pacifist = true;

Allied And Axis Specific:


all_ai = getaiarray("axis", "allies");  //Would Only Pacify Axis and Allied Soldiers
// If You Just Want One Group Pacified You Would Leave // Out The One You Dont Want Pacified. Like Below
// ai = getaiarray("axis",);  // Would Only Pacify Axis Soldiers
for(i = 0; i < ai.size; i++)
ai[i].pacifist = true;

And sometimnes we need to reverse this action. You do that like so:


all_ai = getaiarray("axis", "allies"); // This Would Return Everyone Back To Combat
for(i = 0; i < all_ai.size; i++)
ai[i].pacifist = false;

Im sure this will be useful to someone.
Stay Tuned For More Scripting Fun.[thumbs_up]

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