Page 1 of 2

Tick tock sound?

Posted: Wed Sep 19, 2012 4:03 pm
by Ixnatifual
In some puzzles where timing is important in Grimrock, there's a "tick tock" sound playing to let you know. Is this one we can access and if so which sound on the reference list is used?

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 4:42 pm
by antti
I think it was "key_lock". Try it out. :)

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 5:12 pm
by Ixnatifual
That's it. Thanks :)

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 6:47 pm
by Emciel
key_lock.... ke_lock.... k_lock... klock... CLOCK!!!!
wow... =D

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 6:49 pm
by Komag
groan :roll:

but really, :lol:

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 9:48 pm
by Ixnatifual
Now I have the problem that if I fall into a pit while the tick tock is playing, it continues to play on the level below, but at a much slower rate. Is there a way to either stop it running slowly or check whether the party is on the correct level in the script? That way I can make the script reset the puzzle if they fall down.

After a lot of work I managed to get this puzzle working. The setup behind the scenes is ugly as Hell, but the puzzle looks cool in-game. I just hope it isn't too easy to solve.

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 9:53 pm
by Komag
party.level will return a number of the level you're on, so I'm sure there would be away to make sure that matches the correct level or else turn things off, reset, etc

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 9:59 pm
by Ixnatifual
Is there any documentation for that method? I've blindly tried a number of variatons on it but either haven't managed to guess the correct name or what type it returns. Or both.

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 10:01 pm
by Montis
http://www.grimrock.net/modding/scripting-reference/

right on top, below "Accessing Entities"

Re: Tick tock sound?

Posted: Wed Sep 19, 2012 10:12 pm
by Komag
maybe adding in something like:

Code: Select all

if
     party.level == 1
then
     -- do everything you want to do
else
     -- stop everything and reset it all
end