Help needed with really simple scripts

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: Help needed with really simple scripts

Post by Merethif »

crisman wrote:The script you gave me it's working fine, just had to tweak a little bit - delete last end and put function check() between last if and the end above it. Anyway, I'd like to give you a much simpler code for that:
SpoilerShow

Code: Select all

function check()
for i = 1, 4 do
	for j = 1, 31 do
	local itemObj = party:getChampion(i):getItem(j)
		if itemObj ~= nil then
			if itemObj.name == "rock" then
				teleporter_1:activate()
			end
		end
	end
end
end
It does not deactivate the teleporter though, it will only need a couple more strings.
Thanks. I'll check it tomorrow though, because this evening instead of usual modding, I've been playing The Tomb of Zarthos ;-)
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Help needed with really simple scripts

Post by Neikun »

So that's where everyone's been..
Haha
I've been going a little texture crazy over here.
Currently working on some cleaner dungeons.
SpoilerShow
Image
Edit: of course, I could always put the moss back on top of these walls, too :o
"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!
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Help needed with really simple scripts

Post by crisman »

Cool, I can imagine some sort of symbols/runes based puzzles with those marks on the walls, nice job :D
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: Help needed with really simple scripts

Post by Merethif »

crisman wrote:The script you gave me it's working fine, just had to tweak a little bit - delete last end and put function check() between last if and the end above it. Anyway, I'd like to give you a much simpler code for that:
SpoilerShow

Code: Select all

function check()
for i = 1, 4 do
	for j = 1, 31 do
	local itemObj = party:getChampion(i):getItem(j)
		if itemObj ~= nil then
			if itemObj.name == "rock" then
				teleporter_1:activate()
			end
		end
	end
end
end
It does not deactivate the teleporter though, it will only need a couple more strings.
Thanks crisman. Works great. Actually it's even better when teleporter is not deactivated after it become activated once.
crisman wrote:Cool, I can imagine some sort of symbols/runes based puzzles with those marks on the walls, nice job :D
Please guys, stop thinking that way for a while. You're spoiling my room idea for "One Room" round robin! :-D
Post Reply