Jump to content
The Dark Mod Forums

Ai Path Question


buck28

Recommended Posts

Can two AI's use the same Path Corners? Like when you have two patrolling guards on a long patrol route, at different time intervals?

I've been searching but can't find the answer.

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

Yes, of course. Many AI can patrol along the same route. This is very handy in RITs for example.

 

The only limit is the corridor/route space, and it would look silly if you had too many AIs walking the same route.

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Can two AI's use the same Path Corners? Like when you have two patrolling guards on a long patrol route, at different time intervals?

I've been searching but can't find the answer.

 

Not really. You can point the prior individual path_corners to the same path_corner (call it A), but both AI are then going to go where A points to. The only chance you have of sometimes having two AI leave A for different path_corners is to have A point to 2 path_corners. When an AI reaches A, he'll have a 50% chance of going to either p_c. This gives you a 1/3 chance that the AI will go to different p_c's, a 2/3 chance they'll both go to the same p_c (be it the first or second p_c).

  • Like 1
Link to comment
Share on other sites

Yes, of course. Many AI can patrol along the same route. This is very handy in RITs for example.

 

The only limit is the corridor/route space, and it would look silly if you had too many AIs walking the same route.

 

I assumed the question was whether two different routes could share the same p_c at some point where the routes crossed. My answer is based on that.

Link to comment
Share on other sites

Just be careful about having AI stopping on the same path node...it can result in AI standing inside each other if they both try to stand/sit in the same spot at the same time.

  • Like 1
Link to comment
Share on other sites

Just be careful about having AI stopping on the same path node...it can result in AI standing inside each other if they both try to stand/sit in the same spot at the same time.

 

I imagine sitting would be a problem, but I have two following together in Inn Business who end up standing next to each other when they wait. I didn't adjust the position tolerance either, they just happily do it naturally without problems.

 

The only chance you have of sometimes having two AI leave A for different path_corners is to have A point to 2 path_corners.

.

With a new feature in the upcoming 2.02, you could have a path_corner be "switching", constantly alternating between two different destination paths instead of having multiple random targets.

 

This would be done by having the next path node trigger a change target for the switching path node to set it the other way. And same for that other way, it would set it back.

 

This'll come in handy in the future to prevent the random aspect of pathing causing AI to do the same thing each time (or never take a certain path for that play of the map). For example, if you had an AI enter an office and randomly go to either the desk, bookshelf, sit with wine, or look at mirror/painting, you could remove whichever one is being done. Then when the final remaining behavior is used, replenish the list.

 

This would add much more variety than the completely random way typically used now.

  • Like 1

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

In my experience, the best thing to do in this situation is to just use a second path node a few feet away from the first.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Well. I have used the models/darkmod/architecture/stairs/mansion_stairs_01.lwo, and my Ai refuses to go near it??? It says it is a func static. Do I need to add a spawnarg to it so that the Pathcorners will work for the Ai to climb and descend the staircase? Right now they stop short and wait, then go back to were they started? Completely avoiding the staircase as if it had the pocks. Hopefully I can use this staircase as my map is built around it.

Edited by buck28

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

AI's are completely oblivious of func_statics. They cannot walk on them. They only can walk on wordspawn brushes.

 

You must build an overlapping WORLDSPAWN geometry on your func_static stairs.

 

You have two choices.

1) Place monsterclip brushes inside the steps. That works too, but you must make the monsterclip steps smaller than the model steps. The AI must really step on the wooden step, rather than on monsterclip, because I don't think monsterclip has any material footstep sound. The monsterclip is only there to tell the AI the area is traversable.

 

or

 

2) Pick common/tdm_nodrawsolid_* with a material that matches your stairs. So if you have a wooden stairs, then use tdm_nodrawsolid_wood. Then build invisible but solid stairs onto the model stairs.

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

With a new feature in the upcoming 2.02, you could have a path_corner be "switching", constantly alternating between two different destination paths instead of having multiple random targets.

 

Cool! I either missed this or completely forgot about it.

Link to comment
Share on other sites

@buck28: NB with either of Sotha's suggestions, you don't need to be precise with the monsterclip steps: You can just make a ramp roughly below the stairs if you want, say within 30-40 units vertically. It's just there to help the AI work out how to get from A to B. They'll walk on your model steps and other FSs as long as there's worldspawn not too far below so they can "see" the path.

  • Like 1
Link to comment
Share on other sites

@Sotha

 

Hmmmm. I see a feature when the steps are highlighted, and I right click, as if to create an entity; it says surround with Monster clip. Will that work??? Or can you turn a func static into worldspawn???

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

@SteveL

 

Thanks much. I'll give it a go and see what happens....

 

 

 

I put in 4 ramps of Monster clip, and my Ai walks his route like he's getting paid too. LOL

Thanks very much. I appreciate everyone's help.

Edited by buck28

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

@Sotha

 

Hmmmm. I see a feature when the steps are highlighted, and I right click, as if to create an entity; it says surround with Monster clip. Will that work??? Or can you turn a func static into worldspawn???

 

Yep, if you turn the steps into worldspawn the AI can walk on it. No need to monsterclip (except the handrails.)

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Cool! I either missed this or completely forgot about it.

 

It's something I realized we could readily do now by virtue of...oh wait, the wiki page list of changes doesn't include it...and the tracker issue name doesn't explain it, but I linked to the comment which does, "0003670: [Design/Coding] "Trigger" spawnarg on path nodes improper (grayman) - resolved."

 

But not to worry, I've already written a forum post, all ready to copy/paste when 2.02 is released, to more broadly bring it to the attention of mappers.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...