Page 1 of 1
Two Questions
Posted: Mon Dec 24, 2012 2:27 am
by cookiemonster16
Hello, I am new to Legend of Grimrock and i got two questions about making levels. First off, I don't know if what I am asking is even possible.
Q,1 Can I make the Skeleton Warrior go in a specific path. I want it to patrol the outer area's of a room which is a square.
Q,2 Is it possible to make the Torch Holder hold a burnt out torch.
Note: I don't know any scripting.
Re: Two Questions
Posted: Mon Dec 24, 2012 2:33 am
by msyblade
For the skeletons path, you can use "blockers". They are right in the asset browser, and look like a red X.
Re: Two Questions
Posted: Mon Dec 24, 2012 2:38 am
by cookiemonster16
Thx for the quick reply, What you said sort of worked. The only problem is when I get into the middle of the room he can get me.
Re: Two Questions
Posted: Mon Dec 24, 2012 3:24 am
by Komag
you would have to script the torch holder, create an ampty one in the editor then add a spawned torch with no fuel:
mytorchholder:addItem(spawn("torch"):setFuel(0))
but I totally don't know right now if that's correct - if not it's close
Re: Two Questions
Posted: Mon Dec 24, 2012 10:51 am
by Xanathar
For the path thing, the best way is to script the onMove and onTurn hooks of that monster so that it allows only the movements on the right path, plus set its sight to 0.
Re: Two Questions
Posted: Mon Dec 24, 2012 7:50 pm
by cookiemonster16
The script you told me dosen't seem to work, so I messed around with it( no scritping experiance here) and this is what I put in torch_holder_3:additem(spawn("torch"):setfuel(0)) and the error I get is attempt to call method ' (a nil value) X. Any help with this would be greatly appreciated.
Re: Two Questions
Posted: Mon Dec 24, 2012 7:55 pm
by Komag
Good idea to visit this page often, I do:
http://www.grimrock.net/modding/scripting-reference/
it's addItem, not additem (capital I) and it's setFuel, not setfuel (capital F)
all the scripting must follow strict capitalization
Re: Two Questions
Posted: Mon Dec 24, 2012 8:01 pm
by cookiemonster16
LOL thx, all I need to do was change those two letters to capitals and it worked.
Re: Two Questions
Posted: Mon Dec 24, 2012 9:18 pm
by cookiemonster16
Should I ask scripting questions here or is there somewhere else I should ask?
Anyways I am trying to get the torch holder(which is holding a burnt out torch) to activate a secret door only when it is holding a lit torch.
I have
, but I have a feeling I am nowhere near right.
I look at the above link, which didn't really help with what I am trying to do.
Very sorry for all the questions, just trying to make a dungeon.
Re: Two Questions
Posted: Mon Dec 24, 2012 9:42 pm
by Komag
actually, that page has "everything".
What you need is containedItems() and getFuel()
link the torch to this script function with "activate" --> "fuelTest"
Code: Select all
function fuelTest()
for i in torch_holder_3:containedItems() do
if i:getFuel() > 0 then
mySecretDoor:open()
end
end
end