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

Members Online

»
0 Active | 113 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

Tutorials

»
CoDUO Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Extended AI control, Advanced ai/friendly scripting
Versions: You must be logged in to view history.
Flipsen explains a more advanced way of controlling your AI
Ok guys, as most of you know, the most basic and easiest way of having your allies follow you or stay around you, is the friendly chain.

However, when one gets to more advanced scripting with more heaviliy scripted missions, one will want to have a bit more control over ai.

First, you may want to know how to make a guy go to a specific node, for this you need to be able to identify the guy and his node through targetnames or script_noteworthy (works the same as targetname, see quote box)

guy = getent("node_runner","script_noteworthy");


Below here is a small script that will make our guy go to a specific node

node_example()
{
node = getent("da_node","targetname");
guy = getent("node_runner","script_noteworthy");
guy.goalradius = 4; //makes sure that this guy doesn't leave his node
guy setgoalnode(node);
guy waittill("goal"); //wait 'till he has reached his node
}



After that, you can put him on the friendly chain again, using the setgoalentity command, as in the example below.

back_to_chain_example()
{
guy setgoalentity(level.player);
}



Then, as a last important thing, you may want to know how to ,manually activate a certain friendly chain trigger(that you could hide somewhere in the sky, and activate after a certain event), for that we use the setfriendlychain command:


activate_chain_manually_example()
{
chain = getent("example_chain", "targetname");
level.player setfriendlychain(chain);
}



I have not tested all of this, but it should work!

I hope this will help some of you with their singleplayer maps

Flipsen

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

»