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!
User avatar
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

Isaac wrote: Wed Sep 25, 2019 7:01 am I cannot easily test this... but you can.

Code: Select all

function killnpc01a()
	if md_npc_ratling2_2 then
		md_npc_ratling2_2:destroy()
	end
end
Is it possible that the md_npc_ratling2_2:destroy() function is called twice?
It IS the case that a monsters removal after calling destroy() is not instantaneous. It remains an object for a minute but significant amount of time afterwards.
Ty that did work but im getting 2 x ratling spawning instead of just 1 ratling lol. At least the error is gone but I don't know why its spawning 2 ratlings it should be only one. Its the same code as above plus the new code you gave me ty :)
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 someone know where to get the Grimrock 2 dungeon file or "dungeon.lua" Has anyone ever recreated it?
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

cowmuffins.net/priv/grimrock2.zip
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Technically it's part of the game. You can create a new editor project, (arbitrarily) call it Grimrock2, and save it. Open the .dungeon_editor file from the mod folder, in a text editor, and change the information to match this:

Code: Select all

dungeonName "Grimrock 2"
author "Almost Human"
description "The official campaign"
dungeonFolder "assets/dungeons/grimrock2"
Save it, and load it like any other project.
—However... this project is read only. You won't be able to save changes.
SpoilerShow
The important line change, is the path to the asset folder.

Code: Select all

dungeonFolder "assets/dungeons/grimrock2"
User avatar
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

How do I get the world position of altar_1 and print its position?

EDIT: Thank you Isaac
Last edited by Eleven Warrior on Sun Sep 29, 2019 1:14 am, edited 1 time in total.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Eleven Warrior wrote: Sat Sep 28, 2019 8:04 am How do I get the world position of altar_1 and print its position?

Code: Select all

print(altar_1:getWorldPosition())
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Is there a simple script that can detect the "difficulty" that the player has chosen?

if Difficulty = Normal
then spawn Normal reward()

Something like that.
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

Pompidom wrote: Sat Sep 28, 2019 4:33 pm Is there a simple script that can detect the "difficulty" that the player has chosen?

if Difficulty = Normal
then spawn Normal reward()

Something like that.
viewtopic.php?f=22&t=14145
User avatar
melierax
Posts: 29
Joined: Sat Oct 27, 2012 2:08 am
Location: Quebec, Canada

Re: Ask a simple question, get a simple answer

Post by melierax »

Unread post by vanblam » Fri Sep 27, 2019 10:18 am
Does someone know where to get the Grimrock 2 dungeon file or "dungeon.lua" Has anyone ever recreated it?

Take Magic of Grimrock editor files on Nexus The dungeon.lua and plus in the file

Sorry for the poor english
User avatar
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

I know there is a script here that when you destroy a barrel it will spawn random food items can someone help me ty :)
Post Reply