Posts from Scripts
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
The encoding is incorrect; it should be Unicode (UTF-16).
Added 24 minutes later
Hmm... the encoding didn't help...
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
The quotes in the script are incorrect; you need to use " or '.
Added 6 minutes later
Thank you so much! It works now!)))
Added 17 hours and 50 minutes ago
What does the NON_ESSENTIAL command do, and how can it be used?
function play_anims()
if GetCurrentPlayer() ~= 1 then return end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', nil)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3) -- Pauses will likely be needed between animation plays
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
-- ... --
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', 'play_anims')To make the script work, you will need a region; when a hero enters it, the animation will be triggered.Added 1 minute ago
What does the NON_ESSENTIAL command do, and how can it be used?
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
To make the script work, you will need a region; when a hero enters it, the animation will be triggered.
function play_anims()
if GetCurrentPlayer() ~= 1 then return end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', nil)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3) -- pauses will likely be needed between animation plays
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
sleep(3)
PlayObjectAnimation("creature", "animation", ANIMATION_PLAY_METHOD)
-- ... --
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region_name', 'play_anims')
Added 1 minute ago
The animation will only play if no other animation (other than "idle00") is currently playing on the object.
ONESHOT - play the animation once; IDLE - continuously loop the animation; ONESHOT_STILL - after the animation finishes playing, the object will remain in the position of the last movement of that animation and will not change it. This is typically used for death animations; there are also INVISIBLE and NON_ESSENTIAL, but they are rarely used.
It's better not to use numbers to name regions, but to give them ordinary names in Latin.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Which player's hero entered the region? I made a version specifically for single-player; for multiplayer, you need to remove the check for the current player.