Puzzle involving a route

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Puzzle involving a route

Post by crisman »

I want to share my "wonderful" script (because it really saved me tons of work :mrgreen: ), for a 'route' puzzle, like the... uhm, the secret on level 6 (I don't remember the name that secret has a name like roundabout or something like that) which you have to walk around some pillars in a certain way, and then some items (and a monster!) will spawn.
Since my route has almost 20 hidden pressure plate to be pressed in a certain order (I have to say this clearly, WITHOUT passing twice on a same spot, otherwise this script won't work), and doing them with
if pressupreplate0:isUp and counter:getvalue() == 0 then increment
if pressupreplate1:isUp and counter:getvalue() == 1 then increment, I used a index.
You need to call your plates like plate0, plate1, plate2 and so on. Place a counter, which I'll call counterRoute, and connect all the plates to the script to the function route().
The script is written in this way.
SpoilerShow
function route()

i = counterRoute:getValue()
if findEntity("plate"..i):isUp() then
counterRoute:reset()
else
counterRoute:increment()
end
end

function reset()

counterRoute:reset()

end
Of course, you can place some plates that they just reset your counterRoute. No deviations! :mrgreen:
I've omitted the check script (for my puzzle the player must press a button at the end of the route and see if it was done right), but I'm sure it's not a problem for you ;)
Oh, the hard part is... naming correctly the plate (the first time I forgot to rename a plate... and I could not figure out why the script wasn't working :lol: )
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Puzzle involving a route

Post by Komag »

thank you for this, it's helpful :)
Finished Dungeons - complete mods to play
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Puzzle involving a route

Post by Komag »

The level 6 walkabout puzzle ended up needing something quite different due to stepping on the same plates multiple times, but something very close to your script worked pretty well for the level 9 pillared hallway :)
Finished Dungeons - complete mods to play
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Puzzle involving a route

Post by crisman »

I think you can use the same script, just add another counter and increment it when the party steps on the third plate (I remember there are three main spot to step on).
the spawning prize will depend on the value of this counter. :)
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Puzzle involving a route

Post by akroma222 »

Nice one Crisman!
Post Reply