[Help]Neikun's Sword in Stone with level script to add axe

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

[Help]Neikun's Sword in Stone with level script to add axe

Post by Brodie301 »

Need a little help on this if anyone wants to. Got the sword in stone working with this script:
SpoilerShow
function donottake()
local max = 0
for i = 1, 4 do
if party:getChampion(i):getLevel() > 5 then
max = 1
break
end
end
if max == 0 then
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
end
end
It works great for the no take, but i also want when i take the sword for 4 doors to open to reveal some high level baddies. I added connectors to the alcove for deactivate door_id open and the doors open, but that is just by clicking alcove at anytime or level.

Edit: Thanks mahric! I was trying to go deep into it and that was just plain simple.
Last edited by Brodie301 on Sun Nov 18, 2012 4:17 am, edited 3 times in total.
The FORCE is with me!!!
User avatar
mahric
Posts: 192
Joined: Sun Nov 04, 2012 3:05 pm

Re: (Help)Neikun's Sword in Stone

Post by mahric »

I'm not sure, but i think this minor addition might solve it, assuming your doors are called door_1 and door_2.
You don't need the connectors to those doors anymore then either.
SpoilerShow
function donottake()
local max = 0
for i = 1, 4 do
if party:getChampion(i):getLevel() > 5 then
max = 1
break
end
end
if max == 0 then
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
else
door_1:open()
door_2:open()

end
end
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: [Solved]Neikun's Sword in Stone with level script

Post by Brodie301 »

Ok got new problem when I insert ancient_axe into stone above script with ancient_axe as item will let me take at any level?
The FORCE is with me!!!
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: [Help]Neikun's Sword in Stone with level script to add a

Post by Brodie301 »

Help appreciated
The FORCE is with me!!!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [Help]Neikun's Sword in Stone with level script to add a

Post by Neikun »

You want to be able to grab the axe at anytime? Just use the alcove that's in the downloaded file.
"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
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: [Help]Neikun's Sword in Stone with level script to add a

Post by Brodie301 »

No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.
The FORCE is with me!!!
User avatar
mahric
Posts: 192
Joined: Sun Nov 04, 2012 3:05 pm

Re: [Help]Neikun's Sword in Stone with level script to add a

Post by mahric »

Brodie301 wrote:No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.
Brodie301 wrote:No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.
As far as I can see just changing to ancient_axe should not change it's behaviour.
It might be in the definition or script of the items.

If you're still looking for help, please try these steps:
1) Put back the dismantler and test it
2) If it works with the dismantler (meaning: you can't take it untill you're all level 5), replace it with your axe.
3) If the behaviour is different with the axe, please post all needed files so we can take a look at those. This includes the definition of the alcove, the sword that works and the one that doesn't.
4) If you don't want to publish the source then use the code below and report the outcome with you use the dismantler and when you use the axe.
SpoilerShow
function donottake()
print("a")
local max = 0
print("b")
for i = 1, 4 do
print("c")
if party:getChampion(i):getLevel() > 5 then
print("d")
max = 1
print("e")
break
end
print("f")
end
print("g")
if max == 0 then
print("h")
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
else
print("i")
door_1:open()
door_2:open()
end
print("j")
end
P.S. If I have a situation like this, it's usually because i have a script running at startup leveling the whole team up to lvl 5, so it seems not to be working with ancient_axe. :roll:
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?
Post Reply