How do you end the mod?
How do you end the mod?
Is there a simple way to roll the credits when you reach the end of the mod?
Thanks!
Thanks!
Re: How do you end the mod?
just call the completeGame() function
e.g.
Then create a script file called ending.lua in the same manner as intro.lua
This actually means you can have multiple endings.
e.g.
Code: Select all
completeGame("mod_assets/cinematics/ending.lua")
This actually means you can have multiple endings.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How do you end the mod?
That makes sense, but how do you create such a script file? I don't see intro.lua anywhere in the mod_assets.Grimwold wrote:just call the completeGame() function
e.g.Then create a script file called ending.lua in the same manner as intro.luaCode: Select all
completeGame("mod_assets/cinematics/ending.lua")
This actually means you can have multiple endings.
Re: How do you end the mod?
Have a look at this thread, it has some good discussion on cinematics.
viewtopic.php?f=14&t=3377
There's also a page in the modding documentation about cinematics:
http://www.grimrock.net/modding/how-to- ... inematics/
As far as creating the file goes... you can create it in your favourite text editor, as long as you make sure you change the extension to .lua and not .txt
viewtopic.php?f=14&t=3377
There's also a page in the modding documentation about cinematics:
http://www.grimrock.net/modding/how-to- ... inematics/
As far as creating the file goes... you can create it in your favourite text editor, as long as you make sure you change the extension to .lua and not .txt
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How do you end the mod?
OK, none of these scripts are working (error messages crash game), and I do not see the original files on my PC (is this because I downloaded from steam??).Grimwold wrote:Have a look at this thread, it has some good discussion on cinematics.
viewtopic.php?f=14&t=3377
There's also a page in the modding documentation about cinematics:
http://www.grimrock.net/modding/how-to- ... inematics/
As far as creating the file goes... you can create it in your favourite text editor, as long as you make sure you change the extension to .lua and not .txt
Here is the file structure i have:
Documents\Almost Human\Legend of Grimrock\Dungeons\Test 03\mod_assets\
animations\(empty)
cinematics\(empty)
models\(empty)
scripts\dungeon.lua
scripts\init.lua
scripts\items.lua
scripts\materials.lua
scripts\monsters.lua
scripts\objects.lua
sdripts\recipies.lua
scripts\sounds.lua
scripts\spells.lua
scripts\wall_sets.lua
sounds\(empty)
textures\(empty)
Can someone please tell me exactly what goes where? Thanks!
Re: How do you end the mod?
By default the cinematics folder is empty, that's completely normal. Like Grimwold already said, you can use any text editor (even the default windows notepad) to create an ending.lua or intro.lua. Just change the extension from txt to lua. Put the lua(s) you created in the cinematics folder and you're good to go. Best is if you start small if you've never scripted before, otherwise you'll have tons of errors and never find out why it doesn't work.
Re: How do you end the mod?
I am with you so far, and I agree start simple. But what text goes in the ending.lua (or intro) I am creating?Phitt wrote:By default the cinematics folder is empty, that's completely normal. Like Grimwold already said, you can use any text editor (even the default windows notepad) to create an ending.lua or intro.lua. Just change the extension from txt to lua. Put the lua(s) you created in the cinematics folder and you're good to go. Best is if you start small if you've never scripted before, otherwise you'll have tons of errors and never find out why it doesn't work.
Re: How do you end the mod?
This is hilarious, I got the credits to roll, but as soon as I enter the mod LOL! How do I get the script_entity to not kick in until I hit the pressure plate connector?
Re: How do you end the mod?
I should have been more detailed when I explained about using completeGame()
Try adding something like this in a script entity:
without the function part, the completeGame() will just fire as soon as the dungeon is loaded, which I guess is what you are seeing happen.
Now it won't complete the game until the function is called. To do this, add a connector from your pressure plate to the script entity, with the action endGame... now when you step on the plate it will run all code in the function endGame() and activate the completeGame command.
Try adding something like this in a script entity:
Code: Select all
function endGame()
completeGame("mod_assets/cinematics/myending.lua")
end
Now it won't complete the game until the function is called. To do this, add a connector from your pressure plate to the script entity, with the action endGame... now when you step on the plate it will run all code in the function endGame() and activate the completeGame command.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How do you end the mod?
That did the trick. Nothing custom yet, but at least you know the game is over.
You are a gentleman and a scholar!
You are a gentleman and a scholar!