Posts from Scripts
I was trying to make it for the single-player mode, but it didn't work. The other scripts play fine, but these ones don't.
If it's the latter, then the monsters either don't have the corresponding animation or the animation set for the arena isn't specified in the monster's settings.
What does the console say?
What exactly is happening? Is nothing playing at all, or are the monsters just standing still and returning to their original position?
If it's the latter, then the monsters either don't have the corresponding animation or the animation set for the arena isn't specified in the monster's settings.
What does the console say?
I was trying to make it work for the single-player mode, but it still didn't work. All the other scripts play correctly, but these ones don't.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Maybe these scripts are interfering? Show the complete script.
if GetCurrentPlayer() ~= 1 then return end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'q0', nil)
PlayObjectAnimation("q17", "death", ONESHOT_STILL)
sleep(3)
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'q0', 'play_anims')
PlayObjectAnimation("q1", "attack00", IDLE)
PlayObjectAnimation("q2", "attack00", IDLE)
PlayObjectAnimation("q3", "attack00", IDLE)
PlayObjectAnimation("q4", "death", ONESHOT_STILL)
PlayObjectAnimation("q5", "attack00", IDLE)
PlayObjectAnimation("q6", "attack00", IDLE)
PlayObjectAnimation("q7", "attack00", IDLE)
PlayObjectAnimation("q8", "attack00", IDLE)
PlayObjectAnimation("q9", "attack00", IDLE)
PlayObjectAnimation("q10", "attack00", IDLE)
PlayObjectAnimation("q11", "attack00", IDLE)
PlayObjectAnimation("q12", "attack00", IDLE)
PlayObjectAnimation("q13", "attack00", IDLE)
PlayObjectAnimation("q14", "death" , ONESHOT_STILL )
PlayObjectAnimation("q15", "attack00", IDLE)
PlayObjectAnimation("q16", "attack00", IDLE)
SetObjectEnabled ('q4' , nil)
SetObjectEnabled ('q14' , nil)
When editing through the map editor, the game crashes.
I need a script that will cause the mission to fail after the hero dies. Thanks in advance.
When editing through the map editor, it crashes.
function alive()
while IsHeroAlive("script_hero_name") do
sleep(10)
end
Loose()
end
startThread(alive)
Added 1 minute ago
If the editor crashes, try editing the script using Notepad.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added after 55 minutes
It's not working.
Added after 5 minutes
I don't understand how to make the script work. Where should I put it so that it works?
<?xml version="1.0" encoding="UTF-8"?>
<Script>
<FileName href="MapScript.lua"/>
<ScriptText/>
</Script>And the MapScript.lua file, into which you need to write the script.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
I think I did it, but it doesn't work. I inserted everything, wrote everything, but there's no effect.
Instead of
Loose(Player, 1)it should beLoose()
-- or --
Loose(1)Everything else is done correctly.Added 7 minutes later
If the map is intended for single-player, it's worth renaming the RMG folder to SingleMissions; otherwise, it will be displayed in the multiplayer map menu.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 9 minutes later
Should I create a new file for each new script?