How To End A Game and Game Over when falling into traps ?
How To End A Game and Game Over when falling into traps ?
Im completely new to this - so here are my first two question i have in mind at the moment:
1) How can i define a point in my own dungeon to end a game, to say "congratulation, levels done" ? which item or tile is necessary ?
2) How can i define a Game Over screen when falling into traps ? Right now , when falling into, the screen gets dark but the game is not over and there is no game over screen.
thanks for help in advance.
1) How can i define a point in my own dungeon to end a game, to say "congratulation, levels done" ? which item or tile is necessary ?
2) How can i define a Game Over screen when falling into traps ? Right now , when falling into, the screen gets dark but the game is not over and there is no game over screen.
thanks for help in advance.
Re: How To End A Game and Game Over when falling into traps
Well I can tell you that you are seeing the black screen when you fall into the pit because it causes a level transition similar to stairs, but if you don't have a level defined below your current one, or there are walls and not a level then you end up in the "black screen."
Not sure how you would right a script to cause a "game over" screen.
Not sure how you would right a script to cause a "game over" screen.
Re: How To End A Game and Game Over when falling into traps
For the "game over" screen, you can just "kill" your party, but perhaps violent technique 
For the "Win" screen, I think you can place a trigger that stop the party, spawning a visual effect ( like particles + flash ) and showing a message "You finished the level".

For the "Win" screen, I think you can place a trigger that stop the party, spawning a visual effect ( like particles + flash ) and showing a message "You finished the level".
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: How To End A Game and Game Over when falling into traps
To get a proper ending, you can use the function
Also check for the GameMode section in the Scripting Reference, there might be some other helpful things that you could fiddle with.
I haven't tried it out yet but I could imagine it works somewhat similar to the LoG1 cinematics, see here: http://www.grimrock.net/modding_log1/ho ... inematics/
Code: Select all
GameMode.completeGame(filename)
I haven't tried it out yet but I could imagine it works somewhat similar to the LoG1 cinematics, see here: http://www.grimrock.net/modding_log1/ho ... inematics/
Re: How To End A Game and Game Over when falling into traps
Ok, but how can i connect the fall into the trap with a new level ?
Re: How To End A Game and Game Over when falling into traps
Just create a new level under actual level [x,y,z] so new level will be [x,y,z+1] (from 0,0,0 to 0,0,1)Fantastic wrote:Ok, but how can i connect the fall into the trap with a new level ?
Re: How To End A Game and Game Over when falling into traps
Thanks ! Added An invisible teleporter under a trap to beam me back to start position. 2nd solution: built a new level with a spin trap combined with a timer to get the game over screen.
Re: How To End A Game and Game Over when falling into traps
Sorry to ask this question here but it's kind of related and I would have a solution if someone can answer this:
There's an isFalling() method on the party but shouldn't there be an onFalling event hook? How can isFalling ever be used?
Edit: duh, it's probably utilized with onMove...maybe? Once I stop drinking this beer I'll check it out.
Edit: duhx2, the onMove may not even work because the transition may get fired once it looks like you're falling. Still drinking beer.
There's an isFalling() method on the party but shouldn't there be an onFalling event hook? How can isFalling ever be used?
Edit: duh, it's probably utilized with onMove...maybe? Once I stop drinking this beer I'll check it out.
Edit: duhx2, the onMove may not even work because the transition may get fired once it looks like you're falling. Still drinking beer.
Last edited by NutJob on Fri Nov 07, 2014 2:52 am, edited 1 time in total.
Re: How To End A Game and Game Over when falling into traps
Just place a floor trigger over the hole.NutJob wrote:Sorry to ask this question here but it's kind of related and I would have a solution if someone can answer this:
There's an isFalling() method on the party but shouldn't there be an onFalling event hook? How can isFalling ever be used?
Edit: duh, it's probably utilized with onMove...maybe? Once I stop drinking this beer I'll check it out.
** It doesn't need to be a pit asset; it can be a -7 floor, with a trigger placed a few elevation levels down the drop.
LoG2 supports compressed videos.Montis wrote:I haven't tried it out yet but I could imagine it works somewhat similar to the LoG1 cinematics, see here: http://www.grimrock.net/modding_log1/ho ... inematics/

Re: How To End A Game and Game Over when falling into traps
But then you can't have the nifty open trap "doors". Just got another beer.Isaac wrote: ** It doesn't need to be a pit asset; it can be a -7 floor, with a trigger placed a few elevation levels down the drop.