How to make "beginning text" and "ending" text for dungeon?
-
whackangel
- Posts: 49
- Joined: Wed Sep 26, 2012 3:50 pm
How to make "beginning text" and "ending" text for dungeon?
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.
Can someone explain to me what I have to do ?
Cheers.
-
whackangel
- Posts: 49
- Joined: Wed Sep 26, 2012 3:50 pm
Re: How to make "beginning text" and "ending" text for dunge
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
What don't you understand? The link Montis gave you has all the info you need...do you have a specific problem?
Re: How to make "beginning text" and "ending" text for dunge
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.
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
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
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.
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
First make a file in the cinematic folder called "myending.lua" with this code:-
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:-
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.
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)
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
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
oh ok... I see the pattern. I have to learn how to create a cinematix .lua file then...
thanks for the headsup !
thanks for the headsup !
Re: How to make "beginning text" and "ending" text for dunge
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
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...
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...
