Hello everyone,
I just wanted to chime in and say that this worked wonderfully. I implemented this in a maze full of ogres and had a friends test it out. It really got him sweating! Thanks for creating awesome posts guys.
Need help understanding timers and counters.
- sevenbirds
- Posts: 10
- Joined: Wed Sep 19, 2012 9:26 am
Re: Need help understanding timers and counters.
sounds great - it's always good news to hear something works the right way!
Finished Dungeons - complete mods to play
Re: Need help understanding timers and counters.
I couldn't get this to work. I created a timer; timer_1 is it's ID in the Inspector. Reading the above, I triedGrimwold wrote:Awesome! Thanks for the quick reply. Somehow I missed the getValue hook when reading the reference.
I had to make one change to your script to get it to work, as hudPrint was expecting a string.Code: Select all
function printTime() hudPrint(tostring(time_01:getValue())) end
hudPrint(tostring(timer_1:getValue()))
but it returns "attempt to call method 'getValue' (a nil value)"
So what I am doing wrong?
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Need help understanding timers and counters.
What you're doing wrong is that timers don't have a getValue() method. Grimwold was referring to "time", which was a counter.
http://www.grimrock.net/modding/scripting-reference/
http://www.grimrock.net/modding/scripting-reference/
Re: Need help understanding timers and counters.
[quote="Montis"]What you're doing wrong is that timers don't have a getValue() method. Grimwold was referring to "time", which was a counter.
d'oh!
Thanks.
d'oh!
Thanks.