Skip to content

← All entries

03

· 3 min read

Wired up the gathering animations

AIANIMATIONSOCIAL

For months the civilians have been doing their whole social system in T-pose. They gather, they walk in groups, they panic and scatter when an alarm goes off, they infect each other through proximity, all in that classic crucified-Vitruvian-man pose. Extremely funny in screenshots, extremely embarrassing to show anyone.

This week they finally got to use their arms.

FGatheringAnimSet is the new struct. A designer drops a paired conversation onto a gathering node: slot 0 is whoever’s talking with their hands, slot 1 is whoever’s nodding and rubbing their chin. When the gathering goes Active, RollAnimSet() picks a configured pair and every participant lands on the matching half. So instead of two NPCs doing unrelated idle loops two feet apart, it looks like they’re having one specific conversation. About something. About anything. I don’t know. The weather, maybe. The strange flying mammal that keeps biting their neighbors.

BTTask_PerformActivity reads its slot index, asks the gathering node for the matching UAnimSequenceBase, plays it through CreateSlotAnimationAsDynamicMontage. That last bit is the part I’m smug about. Designers drop in plain animation sequences and the runtime wraps them as montages automatically. No “right-click, create montage, re-import, why is the slot blank, oh the montage doesn’t have the slot, okay re-export” step. The amount of designer-friction-per-feature in this engine is something I think about a lot, and this is one less.

Walk groups deliberately get nothing here. They already have a gait and a head-tracking behavior; layering a conversation montage on top means the upper body fights the locomotion and the NPC moonwalks while gesturing. Tried it. It’s bad.

While I was in there I also stood up BTTask_PlayIdle. Small task, 0.35 default chance, picks a random one-shot from AEchoAIBase::IdleAnimations, plays it. Dropped after BTTask_WanderInRadius so a civilian who wanders to a new spot has a ~1-in-3 chance of doing something with their hands. Scratch their head. Check their watch. Look around like they forgot what they came outside for. The whole town is mostly people who forgot what they came outside for, now.

One UPROPERTY runs all of it: SocialAnimSlot on the alien. Same slot name for gathering and idle, no per-activity split. Fewer ways to wire it wrong at 11pm.

UHT was clean. Link was Live Coding, which means Ctrl+Alt+F11 and then waiting. Live Coding works, I am grateful it exists, I would like to be done waiting for it.

Next pass is probably the talker/listener role assignment at the start of a gathering. Right now whoever rolled into slot 0 gets stuck always talking with their hands, which over a long enough timeline means the same NPC is the town’s designated gesturer. Forever. Until I infect them.

Anyway. The plaza isn’t a posture exhibit anymore.