Need help with scripting

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Mutman
Posts: 73
Joined: Sun Apr 08, 2012 9:57 pm
Location: Krupka, Czech Republic

Need help with scripting

Post by Mutman »

Hi,
i need help with simple puzzle. I have 11 alcoves and i need to check if in three of them is specified item to open the door. I can script that, but in addition i need to block opening of the door if in other alcove(s) are items and i cant do that. I need that in these three alcoves are specified items and other alcoves are empty. Could someone help please? Thanks
Runebooks: http://www.nexusmods.com/legendofgrimrock2/mods/13/? for Legend of Grimrock 2
Runebooks and books: http://grimrock.nexusmods.com/mods/217/ for Legend of Grimrock 1
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: Need help with scripting

Post by Brodie301 »

Maybe this will help:

viewtopic.php?f=14&t=4437

It's for a more complex alcove puzzle than just a item or two and that's all I've done so far is an item or two.
The FORCE is with me!!!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Need help with scripting

Post by Komag »

You could have all the 8 connect to a counter with proper increment decrement links, with a count starting at 0, and when you check about the other three, also check to be sure that counter value is still 0 :) Have those alcoves NOT activate always, so the counter is only adjusted if it changes from being empty or not
Finished Dungeons - complete mods to play
User avatar
Mutman
Posts: 73
Joined: Sun Apr 08, 2012 9:57 pm
Location: Krupka, Czech Republic

Re: Need help with scripting

Post by Mutman »

Komag wrote:You could have all the 8 connect to a counter with proper increment decrement links, with a count starting at 0, and when you check about the other three, also check to be sure that counter value is still 0 :) Have those alcoves NOT activate always, so the counter is only adjusted if it changes from being empty or not
Thanks! :) it is working perfectly :) i was trying to make it by script for about 2 hours and now its working only by using 2 counters :) awesome :)
Runebooks: http://www.nexusmods.com/legendofgrimrock2/mods/13/? for Legend of Grimrock 2
Runebooks and books: http://grimrock.nexusmods.com/mods/217/ for Legend of Grimrock 1
Post Reply