Beta-1.2.11 now available!

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Beta-1.2.11 now available!

Post by petri »

To clarify currently Timer:activate() resets the timer and starts it, Timer:deactivate() stops the timer without resetting it, and toggle() starts/stops the timer without resetting. So if I change toggle() to reset the timer everybody's happy, right? :)
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Beta-1.2.11 now available!

Post by Montis »

See my post on the last page:
Montis wrote:I'm not quite sure but having activate, deactivate AND reset would probably leave open the most possibilities.
Although this could screw some existing scripts.

So I would suggest leaving everything as is and adding reset and continue methods for those that want to use it, what do you think?

Or alternatively do the reset on deactivate and add a pause method. Or everything combined :shock:
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Beta-1.2.11 now available!

Post by Komag »

petri wrote:To clarify currently Timer:activate() resets the timer and starts it, Timer:deactivate() stops the timer without resetting it, and toggle() starts/stops the timer without resetting. So if I change toggle() to reset the timer everybody's happy, right? :)
but would that leave the possibility of the "pause" method? It could just be left as-is, because right now we have the option to toggle if we want a "pause" effect, or we can do deactivate/activate to get a reset effect

but changing toggle() to reset the timer would be good for consistency, so maybe there should be some new way for authors to have a "pause" method, could even just be called "pause" with the understanding that repeated signals will pause/unpause/pause/unpause
Finished Dungeons - complete mods to play
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Beta-1.2.11 now available!

Post by petri »

Well, I'm not convinced that pause is needed. Any scenarios in mind that would need pause?
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: Beta-1.2.11 now available!

Post by Lilltiger »

Just store the timer value before toggling it to get the pause effect, if you rely need it.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Beta-1.2.11 now available!

Post by Komag »

I was thinking of some "LONG" timer possibilities, but they'd be rare enough that getting and storing the timer value could work easily enough I guess
Finished Dungeons - complete mods to play
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Beta-1.2.11 now available!

Post by Montis »

I don't think you can access a timer value. You would need to do it with a tick-counter.

Anyway, I could see a usage that the player would have to step on a specific square or plate a complete total of [interval] seconds for something to happen. This could of course be also done with a tick-counter.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Beta-1.2.11 now available!

Post by Montis »

Another thing that happens when the reset is on activate:
I have a delay timer on opening a door and two corridors leading to it. In each corridor I have a hidden pressure plate that activates the delay timer, but when I step on one hidden plate and then on the other, the timer resets instead of just staying active, thus increasing the time the door stays closed.
Obviously I know how to do a workaround, but it might be a bit counter-intuitive for others.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Beta-1.2.11 now available!

Post by SpacialKatana »

petri wrote:Good catch! Activating a timer with toggle() and activate() should have the same effect but clearly it doesn't. I need to think about this a bit. I'm leaning towards removing the side-effect that resets timer's value when it is activated, and adding a new method for manually resetting timer. Any comments which behavior would be logical?
Activate - Starts Timer
Deactivate - Stops a running timer
Toggle - Starts a stopped timer / Stops a running timer

Add a timer:reset() function for .lua scripting....adding a reset field would likely break a lot of dungeons...if it doesn't already exist :?

Therefore we have full control over the timer!

My tuppence worth ;)
User avatar
thomson
Posts: 337
Joined: Thu Sep 13, 2012 9:55 pm
Location: R'lyeh
Contact:

Re: Beta-1.2.11 now available!

Post by thomson »

petri wrote:Well, I'm not convinced that pause is needed. Any scenarios in mind that would need pause?
Here's one: Think about something Indiana Jones style. The party steals some valuable treasure and then have fixed number of seconds before the exit closes down. It is not enough to reach the exit if you run straight, but if you step on specific plates, the timer pauses.
[MOD] Eye of the Beholder: Waterdeep sewers forum sources; Grimtools (LoG1 -> LoG2 converter) sources
Post Reply