Two Questions

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
cookiemonster16
Posts: 8
Joined: Sun Dec 23, 2012 5:15 am

Two Questions

Post 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.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Two Questions

Post by msyblade »

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
cookiemonster16
Posts: 8
Joined: Sun Dec 23, 2012 5:15 am

Re: Two Questions

Post 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.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Two Questions

Post 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
Finished Dungeons - complete mods to play
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: Two Questions

Post 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.
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
cookiemonster16
Posts: 8
Joined: Sun Dec 23, 2012 5:15 am

Re: Two Questions

Post 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.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Two Questions

Post 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 :)
Finished Dungeons - complete mods to play
cookiemonster16
Posts: 8
Joined: Sun Dec 23, 2012 5:15 am

Re: Two Questions

Post by cookiemonster16 »

LOL thx, all I need to do was change those two letters to capitals and it worked.
cookiemonster16
Posts: 8
Joined: Sun Dec 23, 2012 5:15 am

Re: Two Questions

Post 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

Code: Select all

torchholder:hasTorch with Fuel(1)
, 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. :D
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Two Questions

Post by Komag »

actually, that page has "everything". :) 8-)

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
Post Reply