Two Questions
-
- Posts: 8
- Joined: Sun Dec 23, 2012 5:15 am
Two Questions
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.
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
For the skeletons path, you can use "blockers". They are right in the asset browser, and look like a red X.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
-
- Posts: 8
- Joined: Sun Dec 23, 2012 5:15 am
Re: Two Questions
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
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
mytorchholder:addItem(spawn("torch"):setFuel(0))
but I totally don't know right now if that's correct - if not it's close
Finished Dungeons - complete mods to play
Re: Two Questions
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.
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
-
- Posts: 8
- Joined: Sun Dec 23, 2012 5:15 am
Re: Two Questions
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
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
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
Finished Dungeons - complete mods to play
-
- Posts: 8
- Joined: Sun Dec 23, 2012 5:15 am
Re: Two Questions
LOL thx, all I need to do was change those two letters to capitals and it worked.
-
- Posts: 8
- Joined: Sun Dec 23, 2012 5:15 am
Re: Two Questions
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.
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
Code: Select all
torchholder:hasTorch with Fuel(1)
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
actually, that page has "everything".
What you need is containedItems() and getFuel()
link the torch to this script function with "activate" --> "fuelTest"
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
Finished Dungeons - complete mods to play