Page 1 of 2
How To End A Game and Game Over when falling into traps ?
Posted: Wed Nov 05, 2014 6:53 pm
by Fantastic
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.
Re: How To End A Game and Game Over when falling into traps
Posted: Wed Nov 05, 2014 7:10 pm
by Baddock
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.
Re: How To End A Game and Game Over when falling into traps
Posted: Wed Nov 05, 2014 8:35 pm
by Doridion
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".
Re: How To End A Game and Game Over when falling into traps
Posted: Thu Nov 06, 2014 12:40 pm
by Montis
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/
Re: How To End A Game and Game Over when falling into traps
Posted: Fri Nov 07, 2014 1:06 am
by Fantastic
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
Posted: Fri Nov 07, 2014 1:11 am
by Jouki
Fantastic wrote:Ok, but how can i connect the fall into the trap with a new level ?
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)
Re: How To End A Game and Game Over when falling into traps
Posted: Fri Nov 07, 2014 1:41 am
by Fantastic
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
Posted: Fri Nov 07, 2014 1:45 am
by NutJob
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.
Re: How To End A Game and Game Over when falling into traps
Posted: Fri Nov 07, 2014 2:49 am
by Isaac
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.
Just place a floor trigger over the hole.
** 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.

Re: How To End A Game and Game Over when falling into traps
Posted: Fri Nov 07, 2014 2:54 am
by NutJob
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.
But then you can't have the nifty open trap "doors". Just got another beer.