Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
azidahaka
Posts: 91 Joined: Fri Apr 13, 2012 9:48 pm
Post
by azidahaka » Sat Oct 06, 2012 6:06 pm
Code: Select all
function portaduomo1()
if torch_holder_1:hasTorch() == true and
torch_holder_2:hasTorch() == true then
portaduomo1:open()
else
portaduomo1:close()
end
end
isn't this very basic?
Huff
Posts: 18 Joined: Fri Jun 22, 2012 9:47 pm
Post
by Huff » Sat Oct 06, 2012 6:10 pm
Looks okay to me. What error are you getting?
Neikun
Posts: 2457 Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:
Post
by Neikun » Sat Oct 06, 2012 6:10 pm
You can achieve this without scripting, if this helps.
Place a counter with intial value of 2
Connect both torch holders to it twice.
Each torch holder should have the two following connections:
event: activate/target:counter/action: decrement
event: deactivate/target:counter/action: increment
Then the counter should be hooked up to what you want with activation any, target the door, action toggle.
azidahaka
Posts: 91 Joined: Fri Apr 13, 2012 9:48 pm
Post
by azidahaka » Sat Oct 06, 2012 6:16 pm
Huff wrote: Looks okay to me. What error are you getting?
no error the door just won't open
Magus
Posts: 56 Joined: Wed Sep 12, 2012 6:05 pm
Post
by Magus » Sat Oct 06, 2012 6:39 pm
change the functionname "portaduomo1" to portaduomo1event or something like that. You can't use the same id name and functionname.
crisman
Posts: 305 Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy
Post
by crisman » Sat Oct 06, 2012 7:04 pm
I think you need to connect the torchholder to the script!7
EDIT: oh I think magus is right. Didn't noticed the function has the same name as the door id
Komag
Posts: 3658 Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA
Post
by Komag » Sat Oct 06, 2012 7:08 pm
don't forget to also connect with "deactivate" event, or "any"
azidahaka
Posts: 91 Joined: Fri Apr 13, 2012 9:48 pm
Post
by azidahaka » Sat Oct 06, 2012 8:22 pm
Magus wrote: change the functionname "portaduomo1" to portaduomo1event or something like that. You can't use the same id name and functionname.
wow i'll try right away.. sound like the silliest of things
azidahaka
Posts: 91 Joined: Fri Apr 13, 2012 9:48 pm
Post
by azidahaka » Sat Oct 06, 2012 8:29 pm
ooooook...
works now but i did had to connect in "anY" version thanks guys, i'm weak at scripting but this sounded so silly not working
Neikun
Posts: 2457 Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:
Post
by Neikun » Sat Oct 06, 2012 11:20 pm
We are all here to help each other. Where you have stumbled, perhaps another might learn.