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: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

Has anyone got a script for water that's about 1 foot deep for dungeon floor, like walking through the sewers the water is up to your knees ty :) I know Issaac had a script for this.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Try zimber's "flood" object. it comes with splashing sounds included when the party or monsters walk through it.
User avatar
Eleven Warrior
Posts: 746
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 spawn a note into a chest with text on the note?
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat »

try it in the editor, put the chest, put the note, then look the dungeon.lua for the corresponding chest, the command line about the note will be written in the dungeon.lua

For many thing, when I don't know or remember the code, I do it that way then look in the dungeon.lua, everything that simple is always clearly written.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
Eleven Warrior
Posts: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

Can someone direct me to grimrock 1 asset pack please ty
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 »

http://www.grimrock.net/modding_log1/asset-pack/

_________

Code: Select all

function addSurfaceNote(target)
	   if target and type(target) == 'table' and #target ==2 then   	  
	      if type(target[1]) == 'string' and type(target[2]) == 'string' then
			  local  note = findEntity(self.go:spawn('note').id)
		 	  local  obj = findEntity(target[1]) 
			  if obj and note then
				if note.scrollitem and obj.surface then
			 	  note.scrollitem:setScrollText(target[2])
				  obj.surface:addItem(note.item) 
				end 
			  end
		  end	
	   end
end	
-- notes			
addSurfaceNote{"chest_1", "I\'m in ur chest!"}
addSurfaceNote{"chest_2", "I\'m in ur chest 2!"}
Last edited by Isaac on Sun Mar 08, 2020 2:17 pm, edited 1 time in total.
User avatar
Eleven Warrior
Posts: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

Ty Isaac. Do you still have that dungeon water walk you know the water is 1 foot deep in the dungeon. I really need it bad if you still have it. Do you have a mod out yet I would like to play it :)
User avatar
Modraneth
Posts: 95
Joined: Thu Aug 27, 2015 8:27 pm
Location: Portugal

Re: Ask a simple question, get a simple answer

Post by Modraneth »

hi, can someone help me with a script?
i have been trying to make a spawn only spawn when party rest

i have been trying this, but this wont work, so where I'm wrong?

Code: Select all

function enablespawner()
	if party:rest() then
	spawner_small_fish.spawner:enable()
	end
	end
just need some teaching on the problem
Mods:
Isle of Gunger
The Bloody Path Dropped
A World of Power work in progress
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 »

Modraneth wrote: Sun Mar 08, 2020 10:45 pm i have been trying this, but this wont work, so where I'm wrong?
It depends upon how you intend to use it.

If you intend to call this function arbitrarily, and check if the party is resting at the time, then replace party:rest() with party.party:isResting() and replace spawner_small_fish.spawner:enable() with spawner_small_fish.controller:activate()

If you intend just that the fish respawn each time that the party rests, then use this instead:

Code: Select all

party.party:addConnector("onRest", self.go.id, "enableSpawner")
function enableSpawner()
	spawner_small_fish.controller:activate()
end
The above script uses the party's—party_component's onRest() hook function to call enableSpawner() each time that the party rests.

*Note: This will allow the player to exploit resting to stock up on as many fish as they wish; not normally a good idea. Be sure to set a reasonably long cooldown in the spawner component.
User avatar
Modraneth
Posts: 95
Joined: Thu Aug 27, 2015 8:27 pm
Location: Portugal

Re: Ask a simple question, get a simple answer

Post by Modraneth »

ya that was a problem too.
i want to make it possible to get some food, but not overdoing it.. so i would need a stopper or a timer
how many time should be good to no overdoing it and make it functional ?

EDIT: also can someone send me a link to the main campaign editor file ?
Mods:
Isle of Gunger
The Bloody Path Dropped
A World of Power work in progress
Post Reply