Jump to content
The Dark Mod Forums

Recommended Posts

Posted

What's your opinion about disallowing an AI sitting down or sleeping if he's not in the correct place where he's supposed to do this?

This happens when the AI is unable to move to the path_corner where the animation plays.

A distance check can be done to determine "closeness", and an AI who fails will log his situation to the console, so mappers can see their AI is having a problem. And can correct it.

A failure will cause the AI to continue on with his patrol beyond the sitting/sleeping animations.

Thanks.

 

Posted

In the worst case, standing next to a chair or bed still looks much better than sitting or sleeping in thin air in my book, so I'd support this.

Some chairs/beds need a lot of slide_distance though, so it'd probably need to be fairly generous before it skips the path node.

  • Like 1
Posted

Slide_distance should be irrelevant, since it's part of the animation (which will be skipped).

It's the AI's inability to get to the path_corner where he should sit/sleep that's the problem.

Posted
6 minutes ago, grayman said:

It's the AI's inability to get to the path_corner where he should sit/sleep that's the problem.

What about the fact that AI can approach the final path_corner before path_sit from different directions?

It can depend on:

  1. Where he came from. Theoretically, all the travel history affects this with rapidly decreasing impact. But the typical case is when there are several nodes targeting the problematic one.
  2. Sometimes guard meets some obstacle. For instance, it may be another guard, or something that player has put on the path. Such situations are impossible to fully test against, but they can affect how the guard sits down.

All of this perhaps does not affect the distance strong enough to make a difference. But it can easily affect the direction.

Is there anything which ensures that guard sits in some specific direction?

Posted
8 minutes ago, stgatilov said:

Is there anything which ensures that guard sits in some specific direction?

Typically a mapper should specify the direction in which the AI should face when the sit animation plays ("angle"), then a second direction for which way the AI should face when seated ("sit_down_angle").

If an AI approaches the chair from the front both angles are identical (so sit_down_angle is superfluous), while approaching from the side or behind they'd be at a 90 or 180 degree angle to each other.

But I don't think this is an issue. After grayman's clarification it'd be just a check if AI origin is within a certain distance of the path_corner origin (move_to_tolerance): skip path_sit node if failed.

Posted

Sitting direction:

1. Set the "angle" spawnarg on the path_sit.

2. If "angle" is undefined, use whichever direction you're facing when the path_sit is processed. Some mappers put a path_turn in front of the path_sit.

 

Arrival direction:

Arrival direction should be irrelevant. The problem is that pathfinding says if the AI is at A and the sitting path_corner is at B, and there's no path from A to B, then the AI will not walk to B. He'll just continue along the string of path nodes.

 

 

Posted
3 minutes ago, Dragofer said:

Typically a mapper should specify the direction in which the AI should face when the sit animation plays ("angle"), then a second direction for which way the AI should face when sitting ("sit_down_angle").

I don't like the word "typically" here 😫 Shouldn't there be a validation check for it?

Quote

But I don't think this is an issue. After grayman's clarification it'd be just a check if AI origin is within a certain distance of the path_corner origin (move_to_tolerance).

Yes, I agree that my comment is not very important regarding the distance check.

Posted
1 minute ago, stgatilov said:

I don't like the word "typically" here 😫 Shouldn't there be a validation check for it?

Not really; we could be giving a false negative to the mapper. The code leaves the problem solution in the hands of the mapper, who can observe what his AI is doing, and adjust accordingly. "My guy isn't facing the right way, let me go to the wiki to see how to correct this."

Posted
2 minutes ago, stgatilov said:

I don't like the word "typically" here 😫 Shouldn't there be a validation check for it?

If it's still the way I remember it, if the mapper makes a path_sit node without defining at least "angle" the AI will just sit down behind himself. Don't think there's any way to get around this without input from the mapper where he's placed the chair.

Posted

Ok, seems my view of the forums was a bit out of sync, now all grayman's replies showed up making mine a bit redundant.

First time I saw the "HOT! 9 replies" tag on a forum thread, hehe.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...