View Issue Details

IDProjectCategoryView StatusLast Update
0003396The Dark ModAIpublic10.05.2013 16:08
ReporterSpringheel Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 2.00 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003396: Need to distinguish between sleeping on bed and sleeping on floor
Descriptionhttp://forums.thedarkmod.com/topic/14406-arcturus-animations/page__pid__310487__st__100#entry310487

Well, it seems like the problem is that regular humanoids play a "sleep" --> "rise to sitting" --> "stand from sitting" pattern to get up. When getting up from the floor we just want a "sleep" --> "stand up" sequence.

We could disable the "stand from sitting" animation on zombies to get around the problem, but that wouldn't work for regular AI, who still need that animation for actually sitting.

We probably need the code to distinguish between sleeping on a bed and sleeping on the floor.
TagsNo tags attached.

Activities

grayman

grayman

10.05.2013 01:17

viewer   ~0005383

I'm thinking of a spawnarg on the zombie that says, "I use different lay down and get up anims".

Then the code looks for that spawnarg and does the right thing.

The lay down and get up anims in the scripts would play the correct anims.

What are the names of the zombie lay down and get up anims, and are they currently in SVN?
Springheel

Springheel

10.05.2013 01:29

administrator   ~0005384

Last edited: 10.05.2013 01:30

It would be nice to have a robust solution that could be used for all humanoid AI...something like "sleep_floor" "1" or something, which then tells the code to use alternate sleep animations: sleep_floor, stand_2_sleep and sleep_2_stand, or something like that.

The zombie.def lists these:

anim sleep_idle_lft models/md5/chars/undead/zombie/zombie_sleep.md5anim
    anim sit_2_sleep_lft models/md5/chars/undead/zombie/zombie_idle_2_sleep.md5anim
    anim sleep_2_sit_lft models/md5/chars/undead/zombie/zombie_sleep_2_idle.md5anim

grayman

grayman

10.05.2013 01:43

viewer   ~0005388

Last edited: 10.05.2013 01:45

Odd choice, continuing to use "sit" in the anim names when he doesn't sit.

Edit: Oh, I see the suggested names above that list.

I'll work on this. All the anims are in SVN?

Springheel

Springheel

10.05.2013 01:44

administrator   ~0005389

Last edited: 10.05.2013 01:45

Well, the current code only looks for those animation names (those are the ones used by regular humanoids, who do sit), so they have to be used to make it work.

edit: I think the animations are on SVN, but I haven't looked. Arcturus has them if they're not.

grayman

grayman

10.05.2013 01:46

viewer   ~0005390

No, they don't have to be used. I'd dup the anim scripts, have them use the proper anim names, and change the DLL to interrogate the "sleep_floor" flag and call for the correct anims.
grayman

grayman

10.05.2013 01:49

viewer   ~0005391

I see that the zombie uses "sleep_idle_lft" but has no "sleep_idle_rgt". Does this mean that he won't bother sliding left or right when he gets on the floor?
Springheel

Springheel

10.05.2013 01:57

administrator   ~0005392

Yes, he gets straight up.
grayman

grayman

10.05.2013 03:48

viewer   ~0005395

This is working now. I'll check the changes in tomorrow.

I tested a guard and the two zombie types, letting them lay down at map start, then awakening them with a noisemaker. When they were done searching, they went back to sleep.

The zombie looks good.
grayman

grayman

10.05.2013 16:08

viewer   ~0005396

Added script code for the zombie lay down and wake up anims. It sleeps on the floor instead of a bed.

Added “sleep_location” spawnarg to indicate whether an AI should sleep on the floor or on a bed.

Rev. 5753:

AI.cpp
AI.h
AI_events.cpp

Rev. 13448:

tdm_ai.script
tdm_ai_base.def
tdm_ai_undead_zombie.def
tdm_ai_base.script


Issue History

Date Modified Username Field Change
04.05.2013 13:18 Springheel New Issue
10.05.2013 01:17 grayman Note Added: 0005383
10.05.2013 01:29 Springheel Note Added: 0005384
10.05.2013 01:30 Springheel Note Edited: 0005384
10.05.2013 01:43 grayman Note Added: 0005388
10.05.2013 01:44 Springheel Note Added: 0005389
10.05.2013 01:44 Springheel Note Edited: 0005389
10.05.2013 01:45 grayman Note Edited: 0005388
10.05.2013 01:45 Springheel Note Edited: 0005389
10.05.2013 01:45 Springheel Note Edited: 0005389
10.05.2013 01:46 grayman Note Added: 0005390
10.05.2013 01:46 grayman Assigned To => grayman
10.05.2013 01:46 grayman Status new => assigned
10.05.2013 01:49 grayman Note Added: 0005391
10.05.2013 01:57 Springheel Note Added: 0005392
10.05.2013 03:48 grayman Note Added: 0005395
10.05.2013 16:08 grayman Note Added: 0005396
10.05.2013 16:08 grayman Status assigned => resolved
10.05.2013 16:08 grayman Resolution open => fixed
10.05.2013 16:08 grayman Fixed in Version => TDM 2.00
10.05.2013 16:08 grayman Target Version => TDM 2.00