Jump to content


Photo

Path entities


  • Please log in to reply
9 replies to this topic

#1 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 179 posts

Posted 07 December 2016 - 03:31 PM

There might be a work around to this, but I find it fairly cumbersome to create a path_corner, path_turn, and path_wait when creating patrols. This gets pretty insane when you've got multiple patrols on different routes and tasks.

 

Is it possible to combine these into one entity or give path_corners the ability to turn the AI and make them to wait? Pardon my ignorance if this is out of the question from a coding standpoint.

 

 

 



#2 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11787 posts

Posted 07 December 2016 - 04:34 PM

You can add an "angle" spawnarg to a path_wait and the AI will turn toward the angle and then wait. (This is mentioned on the wiki page.)

 

That brings 3 entities down to 2.

 

To bring it down to 1, we'd need to add "angle" and "wait" spawnargs to a path_corner. This would need to be a new entity, because we don't want "angle" and "wait" spawnargs to suddenly come alive if a mapper has used them in existing maps (where they'd be ignored).



#3 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 179 posts

Posted 07 December 2016 - 06:49 PM

Oh awesome! I missed that bit in the wiki. Sounds like a new entity would be the way to go for future releases, if people are up for it. Maybe path_destination, path_end or something of the sort. It would definitely make path creation and editing a bit easier.

 

While we are on the topic, I remember reading somewhere you can reverse the direction an AI takes along a path? I can't for the life of me find where I read that.


Edited by kingsal, 07 December 2016 - 07:50 PM.


#4 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11787 posts

Posted 07 December 2016 - 07:51 PM

I've never read anything about reversing the direction. The code looks at the target of a path_node and follows that. It doesn't have the ability to go backward.

 

If an AI travels from A to B, and you want him to go from B to A, you have to provide a distinct set of path_nodes from B to A.


  • kingsal likes this

#5 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5587 posts

Posted 08 December 2016 - 04:54 AM

I usually work like this:
1) make path_corner and path_wait. Put them next to each other.
2) make path_corner target path_wait
3) select both path_corner and path_wait
4) clone them around and place them where the AI should patrol. Rotate so that the path_wait angle points where you want the AI to look towards
5) fly through the AI patrol path from node to node and always make the previous path_wait of the previous node to the path_corner of the next node. You can do it like this: select previous node's path_wait. Fly to next node path_corner. Select it. Press ctrl+K. Deselect. Choose this node's path_wait and fly to the next node's path_corner & repeat.
6) done! Quick and easy.

Bonus1) you could make path_corner->path_anim->path_wait nodes to include some RITs or animations.
Bonus2) you could put each patrol route into own layer for clarity.
  • kingsal likes this
Clipper
-The mapper's best friend.

#6 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 179 posts

Posted 12 December 2016 - 02:53 PM

Ah I see, I must have misread something about changing the direction of the AI pathing nodes.

 

Sotha, that's a pretty good process. Now that I know path_waits can carry an angle, things will be a lot easier. AI pathing is something I've been struggling with.

 

I have another somewhat related question. When using a monster clip volume, will the engine consider the top surface of monsterclips as a path-able area?  Is there a distance threshold at which it will consider that surface unreachable? (Something like ..if the surface is above 16 units to the nearest floor, it will be ignored as a path-able area)

 

Thanks for the help!


Edited by kingsal, 12 December 2016 - 02:59 PM.


#7 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11787 posts

Posted 12 December 2016 - 02:59 PM

Yes, the tops of monsterclip brushes can be included in pathfinding.

 

I've suggested for a long time that mappers bring their m/c brushes up to the ceiling to reduce the number of useless AAS areas.


  • kingsal likes this

#8 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 179 posts

Posted 12 December 2016 - 03:05 PM

Haha, that's what I figured. I've been bringing my bushes to the ceilings as well. Volta is plagued by wacky monster clipping. Plagued.

 

The outdoor area is constructed in such a way that the tops of the playable space are visportals, allowing players to see the tower in the distance. This is a huge nightmare and something I'll probably never do again. My assumption is that's whats causing the AAS process to take a while on compiling. Will caulk knock out AI pathing?


  • Bikerdude likes this

#9 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1223 posts

Posted 12 December 2016 - 03:13 PM

The determining factor if an area is accessible for AI is the distance between a walkable area and the ceiling. The lowest the AAS can be (and consequently the maximum between surface and ceiling should be) is 12 units for the rat AAS.

 

If you use caulk as a surface, it should not be considered a walkable surface. But if you can see the surface from somewhere farther up, it might cause artifacts.



#10 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5080 posts

Posted 13 December 2016 - 02:33 PM

In addition, caulk is solid. Wouldn't use that therefore. nodraw might work, but that needs to be tested.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users