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!
Post Reply
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

There was Phitt's Cozy Dungeon Pack for LoG1:
https://www.nexusmods.com/grimrock/mods/61

A conversion to LoG2 is included in minmay's Grimrock 1 Mega Pack [Alpha 1]:
viewtopic.php?f=22&t=14645&
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Curunir
Posts: 332
Joined: Fri Mar 30, 2012 11:19 pm

Re: Ask a simple question, get a simple answer

Post by Curunir »

Oh, god no! I thought there were no working conversions of those! Now I need those GR1 statues! And I thought I was done with custom assets... Here we go again, another week to be spent pruning... :|

Edit: Aaaaaaahh, automated asset definitions / imports, based on what you choose in the base file. Good ol minmay never fails to amaze! :mrgreen: A bow to the maestro!

God bless you minmay and original asset authors and THOM for linking this and pompidom for asking for chair assets! This pack is full of EXACTLY the sort of inspiration I needed! Thank you all! <3
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Question:
I want to make some kind of blinding light, which should make the Screen go bright, when a function is called,
so the Player is unable to see something for a short period of time.
I want a quick but smooth Transition from normal Screen to bright Screen and back to normal Screen.
Is it possible? If it is, how can i do it?
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Xardas wrote: Fri Jun 01, 2018 12:22 am Is it possible? If it is, how can i do it?
The built in functions are part of the GameMode object.
GameMode.fadeOut(0xffffff, 2)
GameMode.fadeIn(0xffffff, 2)
Color is in hex, 0x000000 is black, 0xffffff is white, 0x82A5FF is light blue.


Code: Select all

--call fadeOut, fadeOut calls fadeIn.  Set delay (5) to be the duration that it stays a solid color.
function fadeOut()
	local delay,fade,color  =  5,1, 0xffffff
	GameMode.fadeOut(color, fade)	
	delayedCall(self.go.id, delay, 'fadeIn', fade, color)
end
	
function fadeIn(fade, color)
	fade, color = fade or 1, color or 0xffffff
	GameMode.fadeIn(color, fade)	
end
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

That´s what i´ve been looking for. Thanks 8-)
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Khollik
Posts: 171
Joined: Tue Aug 29, 2017 6:44 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by Khollik »

Hi everyone

I'm working on a new mod in which I'd like to implement breakable walls. I saw them in various mods but can't find the asset. I started by downloading Minmay's megapack but either it isn't included or I missed it...

Thanks for your help!

Khollik
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

It's part of Skuggs Video Tutorial.

have a look her:
viewtopic.php?f=22&t=7055&start=70#p82105

The first entry of that thread has the code from this session along with a download link to the breakable walls asset.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Khollik
Posts: 171
Joined: Tue Aug 29, 2017 6:44 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by Khollik »

Great !! Thank you THOM!

K.
billb52

Re: Ask a simple question, get a simple answer

Post by billb52 »

How do I do a script to open a door only when party drops all items from their inventory including hand slots?
User avatar
Zo Kath Ra
Posts: 940
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

billb52 wrote: Tue Jun 12, 2018 5:45 pm How do I do a script to open a door only when party drops all items from their inventory including hand slots?
If I understand you correctly, you want this:
When the party is standing directly in front of a door, and nobody in the party is carrying any items, then the door opens (and stays open forever).

script_entity_1

Code: Select all

function openDoor()
	local item_count = 0
	
	for i = 1, 4 do
		local champion = party.party:getChampion(i)
		
		if champion then
			for j = 1, ItemSlot.MaxSlots do
				if champion:getItem(j) then
					item_count = item_count + 1
				end
			end
		end
	end
	
	if item_count == 0 then
		dungeon_door_wooden_1.door:open()
	end
end
timer_1
- timer component unchecked
- timerInterval = 0.1
- disableSelf = false
- triggerOnStart = true
- currentLevelOnly = true
- onActivate connected to script_entity_1 / openDoor()

floor_trigger_1
- onActivate connected to timer_1 / start
- onDeactivate connected to timer_1 / stop
Post Reply

Return to “Mod Creation”