How to make "beginning text" and "ending" text for dungeon?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
whackangel
Posts: 49
Joined: Wed Sep 26, 2012 3:50 pm

How to make "beginning text" and "ending" text for dungeon?

Post by whackangel »

I am having trouble finding a neat and clear explaination about how to create simple lua-scripted texts. I just want a "beginning text" on a black screen before the dungeon starts, and a "ending" text at the end, also with black screen, that sets the dungeon's ending.
Can someone explain to me what I have to do ?
Cheers.
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: How to make "beginning text" and "ending" text for dunge

Post by Montis »

Maybe this can help.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
whackangel
Posts: 49
Joined: Wed Sep 26, 2012 3:50 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by whackangel »

It actually does not. Or I might do something wrong but I feel helpless. Too many details or circunvolutions which are not giving me clues to go the simple way.
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by SpacialKatana »

What don't you understand? The link Montis gave you has all the info you need...do you have a specific problem?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: How to make "beginning text" and "ending" text for dunge

Post by Neikun »

I'm fairly certain cinematics with no image selected are done on a black screen.
If not, I'm sure you could just make your own black image.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
whackangel
Posts: 49
Joined: Wed Sep 26, 2012 3:50 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by whackangel »

I don't know why, but every time I try to luascript something, there's a "global" error thingy, or and "nil value" error and I don't know how to get around this.
I also would like a little example of script to end the game, such as going to credit or something.
Lua seems very hard to me... thank you guys for your help.
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by SpacialKatana »

First make a file in the cinematic folder called "myending.lua" with this code:-

Code: Select all

-- simple one image cinematic
enableUserInput()
startMusic("assets/samples/music/myending.ogg")

-- show the image
showImage("mod_assets/textures/cinematic/outro/my_outro.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)
Obviously you need to put a picture in /mod_assets/textures/cinematic/outro/ for the pic to show.

Next you could use a hidden pressure plate on the floor in the corridor where the party escapes (for example), to trigger a script_entity with this code:-

Code: Select all

function endgame()
completeGame("mod_assets/textures/cinematic/myending.lua")
end
When you step on the plate, the game ends showing your pic with the "You completed...." text on it !

Hope this helps.

Be advised, intro and outro cinematics only work in-game, not in the editor preview.
whackangel
Posts: 49
Joined: Wed Sep 26, 2012 3:50 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by whackangel »

oh ok... I see the pattern. I have to learn how to create a cinematix .lua file then...
thanks for the headsup !
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to make "beginning text" and "ending" text for dunge

Post by Komag »

it's just a .txt file that you rename .lua
Finished Dungeons - complete mods to play
whackangel
Posts: 49
Joined: Wed Sep 26, 2012 3:50 pm

Re: How to make "beginning text" and "ending" text for dunge

Post by whackangel »

ok cheers.
You've been of great help guys.
The 'beta' version of my little dungeon can be found in the workshop under the name "The Next Level". Unfinished business of course, but it is an about one hour course so far.
If you want to give it a try...
Post Reply