Skip to content
User Avatar
#2452
Auto-translated
How to create an animation for creature attacks on the map, in the editor?
PlayObjectAnimation('SCRIPTED_NAME_OF_THE_CREATURE', 'ANIMATION_NAME', TYPE);
for example:
PlayObjectAnimation('npc_1', 'attack00', ONESHOT);
There are animations for attacks and deaths, but not for all creatures. To find out which specific animations a creature has, place it on the map, select it, click in the property tree on Shared, and in the creature's parameter table, one of the first rows will contain the word Animation; click on it, and it will be clear from there.
How to make it in the map editor so that, for example, peasants turn into demons?
Remove the peasants, place the demons in the same spot. You can play some effect on top of that. The following functions will be useful:
RemoveObject('SCRIPTED_NAME_OF_THE_CREATURE');
CreateMonster('NEW_SCRIPTED_NAME_OF_THE_CREATURE', IDENTIFIER, QUANTITY, COORDINATES, ...);
PlayVisualEffect('EFFECT_NAME', ...)
There are many examples of how to use these functions on many maps.