View Issue Details

IDProjectCategoryView StatusLast Update
0006501The Dark ModAIpublic07.04.2024 17:38
ReporterFrost_Salamander Assigned To 
Status newResolutionopen 
PlatformPCOSWindowsOS Version11
Product VersionTDM 2.12 
Summary0006501: sit_down_angle ignored if AI is sleeping
DescriptionOne method of getting an AI to both sit and sleep in a chair is to add the following spawnargs to the AI:

'sleep_location' '2'
'sleeping' '1'

There are a couple of problems with this though:

1) you have to place the AI directly in front of the chair for this to work (because sit_down_angle spawnarg is ignored)
2) If the AI wakes up and becomes alerted, they spin around in their chair 180 degrees for some unknown reason first.

You can also use path_nodes to accomplish this, but it's problematic as well because if the chair is close to a desk for example, the AI may not be able to path to it because the desk is in the way.

Ideally, you would just be able to set the following spawnargs, and place the AI next to the chair:

'sleep_location' '2'
'sleeping' '1'
'sit_down_angle' '180' (or whatever angle you want them to face.

This way both problems are fixed because:
1) the AI wouldn't have a problem pathing to the chair because they can sit in it and pivot the direction they need to face, and
2) they will pivot back the correct way to get out of the chair.
Steps To Reproduce1) Add an AI and a chair to a map
2) place the AI next to the chair, and set the following spawnargs on the AI:

'sleep_location' '2'
'sleeping' '1'
'sit_down_angle' '180'

Start the map, and note that the AI will not pivot before sitting down. If woken up, he will pivot some random direction before getting up for no apparent reason.
Additional InformationWiki page reference:
TagsNo tags attached.




07.04.2024 17:38

reporter   ~0016624

We might be able to close this and I have figured out what to do when using path nodes. My issues was basically how to make an AI sit in a chair that is in front of a desk where there isn't room to walk.

- Use path_corner/path_sit beside the chair so the AI approaches the chair from the side where it has room to do so. The sitting direction needs to be such the the AI sits and slides into the chair (i.e. facing sideways)
- Follow this with a path_wait that points to the direction you want the AI to face. This will make the AI pivot in the chair and face the way you want.

When the AI gets up, they will pivot the correct way to get out of the chair.

Issue History

Date Modified Username Field Change
07.03.2024 21:09 Frost_Salamander New Issue
07.04.2024 17:38 Frost_Salamander Note Added: 0016624