Search found 6 matches

by Green Cube
Thu Sep 20, 2012 1:27 am
Forum: Modding
Topic: Scripting Problem: Grimrock Alchemist
Replies: 3
Views: 3326

Re: Scripting Problem: Grimrock Alchemist

@Lillitiger: You're right, I complicated it. I tried it doing the way you suggested, but a problem came up. I now want to ask if a specific item is in one of three alcoves. I know I can do this by asking three times for each alcove, but is it possible to ask just once? Lua doesn't recognize "or...
by Green Cube
Wed Sep 19, 2012 1:06 am
Forum: Modding
Topic: Scripting Problem: Grimrock Alchemist
Replies: 3
Views: 3326

Scripting Problem: Grimrock Alchemist

Hey, I wanted to (kinda, sorta) create a room, where you can get an item by offering an item of equal value. So I created three alcoves with three hidden pressure plates in front of them and a lua script. function checkName() for s_item_1 in alcove_1:containedItems() do item_1 = s_item_1 end for s_i...
by Green Cube
Tue Sep 18, 2012 5:26 pm
Forum: Modding
Topic: Scripting Problem: Sequence Lock (solved)
Replies: 29
Views: 24352

Re: Scripting Problem: Sequence Lock

With my new script you can actually make any sequence. E.g. pull lever 1,4,4,2,3,1,3,2,2,3,1 ... Don't worry, I love you all equally. :P There is a problem with the script however. If you pull more than how many levers were determined by the counter the game crashes with a nil value error. I "...
by Green Cube
Tue Sep 18, 2012 4:27 pm
Forum: Modding
Topic: Scripting Problem: Sequence Lock (solved)
Replies: 29
Views: 24352

Re: Scripting Problem: Sequence Lock

Thank you so much! So I got Shroom's and Montis' script working. I was even able to modify Shroom's script making it close the door and being able to pull levers multiple times like so (for the sake of testing only three levers): function leverOne() if( p_special_counter:getValue() == 5 ) then p_spe...
by Green Cube
Tue Sep 18, 2012 12:10 am
Forum: Modding
Topic: Scripting Problem: Sequence Lock (solved)
Replies: 29
Views: 24352

Re: Scripting Problem: Sequence Lock

I want the levers to be activated and deactivated like any other lever. But if I activate them in a specific order, in my code it's just 1,2,3,4, the door is supposed to open. If the levers are being pulled in any other order, then nothing is supposed to happen. For now in my code it works like this...
by Green Cube
Mon Sep 17, 2012 11:36 pm
Forum: Modding
Topic: Scripting Problem: Sequence Lock (solved)
Replies: 29
Views: 24352

Scripting Problem: Sequence Lock (solved)

Hello, let me start off by saying this is just my second day ever scripting something, so bear with me. :) I'm trying to open a door using levers being pulled in a specific order. Now I managed to pull it off this way. -- Sequence Lock Puzzle function leverCheck() if p_sequencelock_lever_1:getLeverS...