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

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for 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: Patrolling AI and Color Groups
golgo13
General Member
Since: Mar 18, 2013
Posts: 18
Last: Sep 19, 2013
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Sunday, Jul. 21, 2013 07:27 pm
I'm trying to set-up some AXIS AI to patrol back and forth or patrol around a building on a loop of nodes, but I'm not quite sure the best way to do this. I don't want to trigger my AI using a trigger volume, I was going to do it via script, but it doesn't really matter. If I have to use a trigger volume like in the tutorial, so be it. :)

I read the color group tutorial and the author don't really cover having AI go from Node A -> Node B -> Node A or basically on an infinite loop. Do I need to use cover nodes or can I just assign a script node to a color group and have AI ping-pong between them?

I've got my spawner placed and it's assigned to a K/V color group:
script_forcecolor
r
I placed a multi use trigger that's also tied to that color group:
script_color_axis
r1
and I have two cover nodes assigned to:
script_color_axis
r1 r1
and
r2 r1

How do I get the AI to go back to r1 r1 from r2 r1?

Thanks again!

Share |
MPKiller545
General Member
Since: Jun 28, 2010
Posts: 42
Last: Sep 27, 2017
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Sunday, Jul. 21, 2013 07:49 pm
Try to mix script & radiant.

If I were you, I would create 2 multiple triggers that they would be outside walkable place (player can't activate it) : First, that tells AI to go first nodes, second to other, and use them in script. For example:
Code:

patrol_init(){
first_trigger = getent("first_trigger","targetname");
second_trigger = getent("second_trigger","targetname");
patrolguys = getentarray("patrol_aixs","targetname");

patrolguys[1] endon("death");
for(;;){
first_trigger notify("trigger");
array_wait( patrolguys, "goal" );
second_trigger notify("trigger");
array_wait( patrolguys, "goal" );
wait(1);
}
}
Share |
golgo13
General Member
Since: Mar 18, 2013
Posts: 18
Last: Sep 19, 2013
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Sunday, Jul. 21, 2013 08:29 pm
Oh, interesting. I didn't think about having AI trigger the pathing to send them back to another node, very cool.

Thanks for that.

I guess I could add some scripting to ensure that it's only a certain AI that triggers the volume.

Also, are cover nodes the best thing for this? To get AI to go to a location, can I use a script node? I just want the AI to go from one location to another, I don't need any other behavior.
Share |
MPKiller545
General Member
Since: Jun 28, 2010
Posts: 42
Last: Sep 27, 2017
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Sunday, Jul. 21, 2013 09:02 pm
You can normally create paths with simply node_pathnodes, with them they will only stand. You don't have to use only nodes from "cover" section but, it must be a node ;)
Share |
Josh.S
General Member
Since: May 27, 2012
Posts: 86
Last: Sep 16, 2014
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 04:41 pm
attachment: image(345.5Kb)
If i wan't Axis ai to move I just give them a target node and place nodes to lead them there.
Share |
golgo13
General Member
Since: Mar 18, 2013
Posts: 18
Last: Sep 19, 2013
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 04:59 pm
Josh-Xenu writes...
Quote:
If i wan't Axis ai to move I just give them a target node and place nodes to lead them there.


Wait a minute, if I place a script_node in Radiant and give a spawner K/V of

target
script_node

It will path to that node? How do I tell it to move? Via script? That would be very easy. That way I could have two nodes target each other to have the AI ping-pong between two locations...

:)
Share |
MPKiller545
General Member
Since: Jun 28, 2010
Posts: 42
Last: Sep 27, 2017
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 05:16 pm
If that script_node is connected to path, and connected like spawner -> node, then AI automatically will move.

If you want te see all paths, type in console:

ai_shownodes 4 (or somethin like that)
Share |
golgo13
General Member
Since: Mar 18, 2013
Posts: 18
Last: Sep 19, 2013
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 05:20 pm
MPKiller545 writes...
Quote:
If that script_node is connected to path, and connected like spawner -> node, then AI automatically will move.


Okay, that's cool.

I have path nodes all over the map so AI can move.

How do I connect a script_node to a path_node? Is it just a K/V with target or are you simply saying that so long as there is valid path_node area for AI and they have a proper K/V target to a script_node, they will walk to that location?

:)

I'm learning that the tools can be pretty simple, but I often make things much harder on myself because I'm overthinking everything... all the time.

LOL

Share |
MPKiller545
General Member
Since: Jun 28, 2010
Posts: 42
Last: Sep 27, 2017
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 05:40 pm
Game will calculate the fastest way Actor -> targetnode throw valid path and move actor throw that way.
Share |
golgo13
General Member
Since: Mar 18, 2013
Posts: 18
Last: Sep 19, 2013
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Jul. 22, 2013 05:46 pm
So if I want to create a looping patrol of a single AI, I can do something as simple as:

spawner (k/v target script_node1) -> script_node1 -> script_node2 -> script_node3 -> script_node1 -> etc...

I just have each script_node target the next one.

That should essentially create an infinite loop, correct?
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»