voltorben Posted June 30, 2015 Share Posted June 30, 2015 Hi,I started looking into DS modding last night (not new to coding, so dont be afraid of getting techical).I'm playing around with the nightmare cycle (nightmareclock.lua) and while in the Ruins (in-game) i can use GetNightmareClock() and and listen for the 'nightmareclocktick' event. It all works fine.However when i try to call GetNightmareClock() in the caves (or the overworld, for that matter) i get an error.Also the 'nightmareclocktick' event isn't fired except when im in the ruins.First i thought, "yeah, okay, the clock simply only runs in the ruins". But after some testing i can conclude that is does in fact run while im in the caves - pretty precisely - like the day night cycle in the overworld does while your are spelunking.So my question is, how does the nightmare clock keep track of itself (keep running) while i'm not able to call it or listen for the events? How can i listen/use it when i'm not in the ruins?Thanks for reading Link to comment https://forums.kleientertainment.com/forums/topic/55772-how-does-nigtmareclock-run-when-you-are-not-in-the-ruins/ Share on other sites More sharing options...
Seiai Posted June 30, 2015 Share Posted June 30, 2015 @voltorben, the ruin are actually just something like "cave 2". GetWorld():IsCave() and self.inst.topology.level_number == 2 caves also have the nightmarerifts, that use the nightmareclock. so u could probably look how nightmarerifts in the caves use the nightmareclock. Link to comment https://forums.kleientertainment.com/forums/topic/55772-how-does-nigtmareclock-run-when-you-are-not-in-the-ruins/#findComment-651078 Share on other sites More sharing options...
voltorben Posted July 1, 2015 Author Share Posted July 1, 2015 (edited) That is a really good idea to check the nightmarerifts! Thanks No need yet to distinguish between cave and ruins right now, since the events wont even fire other places than the ruins But that little piece of code will sure come handy if i figure out the other stuff. So thanks for that too!(unfortunately can't look before i'm off work. But i will edit this post with any findings, in case people search it in the future) Edited July 1, 2015 by voltorben Link to comment https://forums.kleientertainment.com/forums/topic/55772-how-does-nigtmareclock-run-when-you-are-not-in-the-ruins/#findComment-651169 Share on other sites More sharing options...
rene111 Posted September 2, 2015 Share Posted September 2, 2015 @voltorben @Seiai I had this question too!!!Did you find the answer? Unfortunately nightmare fissures in cave1 are not hooked to the nightmare clock T__T I wanted to add a little bit of speech to the characters to indicate nightmare clock status when the characters are in cave1, but adding to nightmare clock.lua does not work.............. Thank you!!! Link to comment https://forums.kleientertainment.com/forums/topic/55772-how-does-nigtmareclock-run-when-you-are-not-in-the-ruins/#findComment-668767 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now