Resting quest

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
xbdj
Posts: 32
Joined: Sun Dec 30, 2012 7:43 pm

Resting quest

Post by xbdj »

How do you code a puzzle like "rest where the 2 dragons gaze"
Im guessing it must be some hook thing with onRest() function...but I cant quite wrap my head around it...

Preferrably I would like the puzzle to check where and how long the party rests
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: Resting quest

Post by Phitt »

I would probably use the onRest hook, check for the party position (party.level, party.x, party.y - you could also use a hidden pressure plate that triggers a counter or something and check for that) and if it returns true I'd start a timer. Then you could use the onWakeUp hook to reset and stop the timer if the party wakes up to early. There may be a more elegant way, but this is what comes to my mind right now.
xbdj
Posts: 32
Joined: Sun Dec 30, 2012 7:43 pm

Re: Resting quest

Post by xbdj »

Sounds about right

But where to place that hook? Is that in some external lua file?
Or in a script entity in the editor?

ps: playing the Mine right now ;-)
Cool stuff...!
xbdj
Posts: 32
Joined: Sun Dec 30, 2012 7:43 pm

Re: Resting quest

Post by xbdj »

I think I figured it out
Cloned the party in a lua file and added the "onRest" hook...
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Resting quest

Post by Komag »

by the way, the two statues gaze puzzle on level 5 doesn't require resting at all, just standing in that square for 31s (if you step off and back on the timer resets).
Finished Dungeons - complete mods to play
xbdj
Posts: 32
Joined: Sun Dec 30, 2012 7:43 pm

Re: Resting quest

Post by xbdj »

Ah ok, cool

Well...my wife decided that you need to actually rest for this puzzle, so I had to do the programming right
And not cheat like Almost Human ;-)
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Resting quest

Post by Komag »

I discovered a lot of "cheating" going on throughout my rebuild, some interesting shortcuts that work well usually. :)
Finished Dungeons - complete mods to play
Post Reply