Skip to content
User Avatar
#3965
Auto-translated
Madara_X
Hello everyone! I have a question about the PlayObjectAnimation function. When used, the objects end up in awkward poses. This happens with Necropolis creatures. I read on the forum that this is because the animation is not linked to the creature. I would like to know how to fix this issue. Perhaps there is a way to specify the path to the animation file?
Here is an example of the code:
PlayObjectAnimation("sklep5", "death", ONESHOT_STILL)
PlayObjectAnimation("archlich", "cast", ONESHOT);
Most creatures and heroes have two types of animations: arena animations (e.g., with the "-arena" suffix) and adventure map animations (e.g., with the "-adv" suffix). If you want a creature to use arena animations on the map, you need to edit the config file in MapObjects/Race of that creature so that it uses the arena model and animations both in the arena and on the adventure map. To do this, let's take Vampires from Necropolis as an example. Open the file Vampire.(AdvMapMonsterShared).xdb in MapObjects/Necropolis. Here, we are only interested in the first two lines, Model and AnimSet. As you can see, the model is LOD and the animation is -adv, which means the creature has a low-quality model and only one animation specifically for the map - idle. You need to copy the file to your map, place it in the same path, and in the first line, remove the _LOD suffix, and in the second line, replace _LOD-adv with -arena. It should look like this between the quotes:
Model href="/_(Model)/Creatures/Necropolis/Vampire.(Model).xdb#xpointer(/Model)"
AnimSet href="/_(AnimSet)/Creatures/Necropolis/Vampire-arena.(AnimSet).xdb#xpointer(/AnimSet)"

Всякое/карты:

Добавление недостающей музыки гномам

Statistics

Welcome our newest member: artem