MODSonline Subscriptions
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
The next MODSonair show will air LIVE on:
03/21/2010 12:03 EDT

Time remaining:
We Dontated to PixelEquity
"A total overhaul mod changes or redefines the gameplay style of the original game, while keeping it in the original game's universe or plot." 3
 
Site News   |   Aggregated News   |   Forums   |   Tutorials   |   Downloads   |   Projects   |   Weblinks
Latest Forum Threads 
CoD2 MP Mapping.. Posts: (6) Views: (46) by PanZerReBorN
CoD4 Map + Mod R.. Posts: (30) Views: (205) by sam_fisher3000
CoD4 MP Mapping.. Posts: (24) Views: (468) by DeekCiti
CoD4 Scripting.. Posts: (3) Views: (15) by Samuel033
General.. Posts: (1) Views: (15) by Morphisnb
CoD4 SP Mapping.. Posts: (8) Views: (105) by voidsource
CoD2 MP Mapping.. Posts: (8) Views: (53) by Infern4ll
CoDUO Mapping.. Posts: (3) Views: (34) by Fawlty
CoDUO Mapping.. Posts: (4) Views: (29) by morgawr
CoD4 Map + Mod R.. Posts: (2) Views: (46) by Hajas
Back to Home Page
MODSCON 2010 L4D2 Contest
Dr. Nano Free for the iPhone and iPod Touch
Register/Login to Add a Tutorial
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