Throwing things at the wall

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
vorebane
Posts: 41
Joined: Wed Oct 03, 2012 4:31 am

Throwing things at the wall

Post by vorebane »

I suspect this is already covered somewhere, I'm sure I remember reading about the functions needed. I would like to make a puzzle where something happens when something is thrown at a wall segment. I remember a puzzle that used this, but I have no idea how to replicate it, which should be enough for me to figure out how to do something different with it. Is this possible, or I am imagining things?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Throwing things at the wall

Post by Neikun »

Someone get Montis. He probably remembers.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Throwing things at the wall

Post by Lmaoboat »

I think you can just make a script to check for an entity on a specific tile using entitiesAt(level, x, y)
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Throwing things at the wall

Post by Grimwold »

I was also going to suggest the entitiesAt() solution. However you could use a(n invisible) receptor triggered by a thrown object e.g. throwing_knife

PS - you may be remembering the puzzle in the main game where you have to throw 2 rocks to open a door and get the Cuirass of Valor
vorebane
Posts: 41
Joined: Wed Oct 03, 2012 4:31 am

Re: Throwing things at the wall

Post by vorebane »

Yes, I think it was the secret for the cuirass, something about throwing from the shadows of the torches, I remember thinking it was a very cool hint concept. An entities script doesn't seem like the answer though, because something has to trigger it. I could make liberal use of item only hidden pressure plates, but wouldn't get the 'throw from here' aspect. No, actually, I could have an if statement demand they stand in the right place when the plate is depressed. OK, thanks for jogging my brain, guys. I want to find a way to cut out the middleman here, but this will work for my purposes.
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Throwing things at the wall

Post by Grimwold »

If I were re-making the puzzle from the original game, I'd have a hidden plate where the party had to stand and 2 hidden receptors for rocks.

All 3 would be connected to a counter set at 3 and each would decrement when activated.. counter would open the door when it reaches 0. If the party move from the plate before the door is opened, I'd have it reset the counter back to 3. (actually to avoid players throwing 2 rocks at the same receptor it might be necessary to have an extra counter for each receptor, so that they can each only decrement the main counter once)

EDIT - in fact, here's a non-scripted way to set it up:

Code: Select all

spawn("pressure_plate_hidden", 3,20,2, "pressure_plate_hidden_3")
	:setTriggeredByParty(true)
	:setTriggeredByMonster(false)
	:setTriggeredByItem(false)
	:setSilent(true)
	:addConnector("activate", "receptor_counter_3", "decrement")
	:addConnector("deactivate", "receptor_counter_3", "reset")
	:addConnector("deactivate", "receptor_counter_2", "reset")
	:addConnector("deactivate", "receptor_counter_1", "reset")

spawn("receptor_hidden", 6,20,1, "receptor_hidden_1")
	:setEntityType("rock")
	:addConnector("activate", "receptor_counter_1", "decrement")

spawn("receptor_hidden", 3,17,0, "receptor_hidden_2")
	:setEntityType("rock")
	:addConnector("activate", "receptor_counter_2", "decrement")

spawn("counter", 3,16,2, "receptor_counter_2")
	:setInitialValue(1)
	:setValue(1)
	:addConnector("activate", "receptor_counter_3", "decrement")

spawn("counter", 7,20,3, "receptor_counter_1")
	:setInitialValue(1)
	:setValue(1)
	:addConnector("activate", "receptor_counter_3", "decrement")

spawn("counter", 1,21,3, "receptor_counter_3")
	:setInitialValue(3)
	:setValue(3)
	:addConnector("activate", "receptor_door", "open")

spawn("dungeon_door_wooden", 3,22,0, "receptor_door")
This is copied direct from my dungeon.lua file, so the co-ordinates for everything are simply where I placed it to test, but it should show exactly what objects, and connectors you need.. as well as a set of names that work.
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Throwing things at the wall

Post by Montis »

Neikun wrote:Someone get Montis. He probably remembers.
What, me? :ugeek:

Currently not that active on the forums since Xcom :P

Anyway for throwing things at a wall I would've also tried to use receptors.
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: Throwing things at the wall

Post by Komag »

This is a bit old, but I found it interesting to discover that in the original game there is nothing more than plates, and you don't have to throw from the certain spot, and you don't have to use rocks! You can simply place any two items on the plates near the walls, then march back and step on the party plate (where the shadows meet!) and the door will open.

For my version I chose to be more strict, require only rocks to work, and force the party to be actually standing on the right plate for the receptors to work.
Finished Dungeons - complete mods to play
Post Reply