Ask a simple question, get a simple answer

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

https://youtu.be/aECU6e7GbY4

This is the g1_shield_hook object in action.

I'm looking for wall hook objects that accept more than shields.
Preferably with an item component on them.
Are there any available? (besides MAM)
Rs11s21n
Posts: 1
Joined: Tue Mar 12, 2019 10:23 pm

Re: Ask a simple question, get a simple answer

Post by Rs11s21n »

how i can ask monster to go to x y position?
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Rs11s21n wrote: Tue Mar 12, 2019 10:54 pm how i can ask monster to go to x y position?

Code: Select all

zarchton_1.brain:seek(x,y)
Where zarchton_1 is the monster's Id, and x & y are predefined.

The monster will ignore the command, if the brain determines that it cannot reach the location.

_______________________________
Marskilla
Posts: 16
Joined: Sun Mar 17, 2019 9:08 pm

Re: Ask a simple question, get a simple answer

Post by Marskilla »

How do I parse the content of a chest / an alcove using lua scripting ?

the containedItems() method doesn't seems to work in log2
Marskilla
Posts: 16
Joined: Sun Mar 17, 2019 9:08 pm

Re: Ask a simple question, get a simple answer

Post by Marskilla »

Marskilla wrote: Sun Mar 17, 2019 9:12 pm How do I parse the content of a chest / an alcove using lua scripting ?(...)
Ok I got it ! For example in an Alcove named "dungeon_alcove_1" :

Code: Select all

	for myIndex, myObject in dungeon_alcove_1.surface:contents() do
		print("object number :",tostring(myIndex), "- object name :", myObject.go.name )
	end
Bartelemeus
Posts: 1
Joined: Mon Mar 18, 2019 1:39 am

Re: Ask a simple question, get a simple answer

Post by Bartelemeus »

Can you copy/paste floor plans (Like you can with entity's) ?
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

No. The walls must be carved out, separate from the placed assets.

But the editor does allow for rotating the layout of the walls, by 90° increments.
SpoilerShow
Image
Though [strangely] this does not correctly copy the elevations, and might be a feature held over from the early development; before elevations were implemented.
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

You can copy and paste the loadLayer call in the dungeon.lua.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Ask a simple question, get a simple answer

Post by vanblam »

Does anyone know how to create a custom "builder"?
I mostly used builder = "dungeon" or "mine". But how can you create a custom one? or can you?
Thanks in advance :)
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

You can't.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply