Page 2 of 3
Re: Beginning and ending cinimatic
Posted: Fri Mar 01, 2013 10:36 pm
by Meraz
Can i just use the same for the exit by changing the text ? I really suck at this stuff so if i can do a copy paste thing it might be alot safer for me. Been trying for 3 days to figure this out. ?
Re: Beginning and ending cinimatic
Posted: Fri Mar 01, 2013 11:07 pm
by Meraz
well i tried this but it did not work... I made an outro file under cinematics and put this in it:
-- simple one image cinematic
enableUserInput()
startMusic("assets/samples/music/myending.ogg")
-- show the image
showImage("mod_assets/textures/cinematic/outro/page01.tga")
fadeIn(2)
sleep(4)
setFont("Intro")
textWriter([[
You completed my dungeon! Well done blah blah blah!
]])
click()
fadeOutText(0.5)
fadeOut(4)
fadeOutMusic(3)
then a pressure plate triggered lua with:
function endgame()
completeGame("mod_assets/textures/cinematic/myending.lua")
end
i thought the page01.tga was the same picture as before.. what have i done wrong this time? lol im hopeless!
Re: Beginning and ending cinimatic
Posted: Fri Mar 01, 2013 11:37 pm
by Meraz
Can anyone show me a sample ending using only Legend of Grimrock pics. One that i could copy paste that is?
Re: Beginning and ending cinimatic
Posted: Fri Mar 01, 2013 11:51 pm
by msyblade
Here u go sir

it is custom music tho!, and it is in 2 parts, the outro story, then onto custom credits.
Code: Select all
enableUserInput()
startMusic("mod_assets/sounds/intro.ogg")
showImage("assets/textures/cinematic/intro/page02.tga")
fadeIn(2)
-- show the title text
sleep(1)
setFont("IntroTitle")
showText("The End", 3)
sleep(2)
fadeOutText(1)
-- show the story text
sleep(1)
setFont("Intro")
textWriter([[
Removed for spoiler reasons!!!
]])
click()
fadeOutText(0.5)
-- show the story text
sleep(1)
setFont("Intro")
textWriter([[
Hotel Hades Credits:
Designed, written, and created by msyblade
Custom assets:
Custom Wallsets by Daniv
Custom Alcoves by Neikun, batty and crisman
Arcane Ogres by Neikun
Custom spells by Grimwold
Randomized Tomes by Ixnatifual
The ability to put a project like this together:
The entire, awesome community on the grimrock.net forum.
]])
click()
fadeOutText(0.5)
-- show the story text
sleep(1)
setFont("Intro")
textWriter([[
Playtesters/Creative input:
subaruswift (The Original)
Neikun (The Pro)
twist86 (The Connoisseur)
aljen77 (The Completionist)
Thanx so much for playing!!
]])
click()
fadeOutText(0.5)
fadeOut(4)
fadeOutMusic(3)
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 12:09 am
by Ryeath_Greystalk
msyblade's should work fine but if you are cutting and pasting then you will need to change the second line to
startMusic("assets/samples/music/intro.ogg")
because msyblades is calling for a custom sound file that will not be on your computer. Everything else should work, just change the text.
Good luck.
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 12:59 am
by Meraz

it is not working for the ending for some reason .. this is what i put in my cinematics folder:
enableUserInput()
startMusic("assets/samples/music/intro.ogg")
showImage("assets/textures/cinematic/intro/page02.tga")
fadeIn(2)
-- show the title text
sleep(1)
setFont("IntroTitle")
showText("The End", 3)
sleep(2)
fadeOutText(1)
-- show the story text
sleep(1)
setFont("Intro")
textWriter([[
You see the light at the end of the tunnel and the fresh mountain air caresses your face. You take one final look behind you as you exit the cave that takes you out of the tower. Just like Jojo, you live to fight another day.
Well done and thanks for playing!
]])
click()
fadeOutText(0.5)
i named it myending.lua
then i had a script lua tied to a pressure plate that said:
function endgame()
complete("mod_assets/textures/cinematic/myending.lua")
end
what did i do wrong?
its crashing me back to desk top with the error list
do i need to make another folder some place or change names or something? I changed the music file that you said to change i think.. sorry for all the trouble. (btw I am a lady) =P
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 1:48 am
by Ryeath_Greystalk
I have not done an ending yet but I would do two things,
first I would check the file path of this line here
complete("mod_assets/textures/cinematic/myending.lua") and confirm that cinematic is in the textures folder. It is probably correct if you copied msyblades script, but it just seems weird to be in the textures file.
Also what I like to do is just put a hudPrint in the script just to make sure the pressure plate is calling the script correctly.
function endgame()
hudPrint("endgame function active")
--complete("mod_assets/textures/cinematic/myending.lua")
end
and run from the editor and you will know the script is being called, then remove the dashes and the hudPrint once confirmed. (I use hudPrint to troubleshoot a lot)
If you don't get it solved I can test it when I get home but that won't be for a few hours.
edit - I noticed there is no fadeOut() for the picture. Don't know if that would cause a crash or not.
Maybe also try not using a picture. Just put 2 dashes in front of showPicture and fadIn() and try that.
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 8:18 am
by Ryeath_Greystalk
Meraz,
if you havent already got it working then here is what I came up with on my mod.
Code: Select all
-- test one
enableUserInput()
startMusic("assets/samples/music/intro.ogg")
-- show the image
showImage("assets/textures/cinematic/intro/page01.tga")
fadeIn(2)
-- show title screen
sleep(1)
setFont("IntroTitle")
showText("The End\n\nor is it?",3)
sleep(3)
fadeOutText(1)
-- show story text
sleep(1)
setFont("Intro")
textWriter([[
You breathe deep the fresh air as you leave the tower
when suddenly you realize you left your lunch sack
inside. Quickly you turn and dash back inside...
]])
click()
fadeOutText(0.5)
sleep(1)
textWriter([[
Coming soon..JoJo's Tower II, the apple fritter of doom.
Thank you for playing JoJo's Tower.
]])
click()
fadeOutText(0.5)
fadeOut(4)
fadeOutMusic(3)
Put this into notepad and save it as a .lua file and put in your mod_assets/cinematics folder.
You can name it whatever you want but for this example we will name it gameover.lua Then your function will be
function ending()
completeGame("mod_assets/cinematics/gameover.lua")
end
give that a shot and see what happens.
(and you can change the text in case you want the ham sandwich of doom)
edit: looking again I think your script looks fine, the issue is probably in your function. You have it as cinematic and it needs to be cinematics (with the 's').
For some reason in the game files it's cinematic (singular) and in mod_assets it is cinematics (plural). Might just have to add the 's' and resave it.
Good luck
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 9:10 am
by msyblade
I believe you found it!, two things. Think Ryeath nailed it down for you. In your ending lua, in the editor, you have your cinematics path pointing to your textures folder, it should simply be in mod_assets/cinematics. Also at the end, after fading out text, you may need to add these two lines
fadeOut(4)
fadeOutMusic(3)
So at the very end it would look like
]])
click()
fadeOutText(0.5)
fadeOut(4)
fadeOutMusic(3)
Hope this gets it working, and please dont hesitate to post if you are still having trouble!
Re: Beginning and ending cinimatic
Posted: Sat Mar 02, 2013 11:19 am
by Meraz
Thanks guys ill give it a try.