a little help ;)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
papazombie
Posts: 17
Joined: Sat Sep 15, 2012 1:00 am

a little help ;)

Post by papazombie »

1 - Well, How can I do a dungeon_alcove only works with a concrete item? f.e. only with a rock.
thanks ;)

2 - I have a problem conecting levels with stairs; when I go down it works but when i want go up it doesnt work; the party stop
thanks again ;)
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: a little help ;)

Post by Komag »

1. I don't understand the question

2. It's easy to mix up the directions on the stairs. It's also easy to forget to keep the stair square empty
Finished Dungeons - complete mods to play
User avatar
juho
Posts: 238
Joined: Mon Feb 27, 2012 1:18 pm

Re: a little help ;)

Post by juho »

1. See if this helps: viewtopic.php?f=14&t=3099#p31524

2. Make sure that you have correct stairs in a right direction and that you have cleared the the space where the stairs are.
Follow me on Twitter: @JuhoMakingStuff
papazombie
Posts: 17
Joined: Sat Sep 15, 2012 1:00 am

Re: a little help ;)

Post by papazombie »

1 - It works; i had to put stairs on the same square and add empty square on each stair...thanks :D


2 - I need that a concrete item like a dagger put on an alcove opens a door. I dont know how to modificate the link you passed me to make this because i dont know programming in LUA :roll:
User avatar
Billick
Posts: 201
Joined: Thu Apr 19, 2012 9:28 pm

Re: a little help ;)

Post by Billick »

If you want to check for a specific item in an alcove, I don't think there's any way around writing a little bit of code. Maybe I can give you an example that's a little bit closer to what you want to do. First off create your alcove and door, if you haven't already. Then create a script_entity object (it has the "lua" icon in the object browser). It doesn't matter where you put it on the map, but you will want to put it close to your door and alcove so that you remember it goes with them. Select you entity, and add this code into your script entity in the big text box in the inspector tab:

Code: Select all

function daggerCheck()
   for i in my_alcove:containedItems() do
      if i.name == "dagger" then
         my_door:open()
      end
   end
end
Replace my_alcove with the ID of your alcove (something like dungeon_alcove_1), and my_door with the ID of your door. You can find the IDs in the inspector tab when you select them. Then select your alcove and click on the add connection button, and select the script_entity you created. At this point, you should be set to go. Placing a dagger on your alcove should open the door for you.
Halls of Barrian - current version 1.0.3 - Steam Nexus
Me Grimrock no bozo!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: a little help ;)

Post by Komag »

ah, that's nice and clean, I've added it to the script repository :)
Finished Dungeons - complete mods to play
papazombie
Posts: 17
Joined: Sat Sep 15, 2012 1:00 am

Re: a little help ;)

Post by papazombie »

2 - WOW; thanks a lot :D
papazombie
Posts: 17
Joined: Sat Sep 15, 2012 1:00 am

Re: a little help ;)

Post by papazombie »

I wonder if you could write for 2 or more concretes items in 2 or more alcoves to open a door. For example; to open a door you have to put a dagger on the first alcove and a compass on the second alcove. I have tried to modify what you write but it doesnt work. Thanks again ;)
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: a little help ;)

Post by Komag »

you can just add in a counter in the process
Finished Dungeons - complete mods to play
Magus
Posts: 56
Joined: Wed Sep 12, 2012 6:05 pm

Re: a little help ;)

Post by Magus »

This should work for you, its basically the same version like Billick posted, just with 2 alcoves and 2 booleans.

Code: Select all

alcoveBool1 = false
alcoveBool2 = false

function alcove1Check()
	for i in my_alcove1:containedItems() do
		if i.name == "dagger" then
			alcoveBool1 = true
			checkAlcove()
		end
	end
end

function alcove2Check()
	for i in my_alcove2:containedItems() do
		if i.name == "compass" then
			alcoveBool2 = true
			checkAlcove()
		end
	end
end

function checkAlcove()
	if alcoveBool1 and alcoveBool2 then
		my_door:open()
	end
end
Post Reply