[HELP] Healing Crystal Red and Green

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Neikun »

In the mean time, please offer more colour suggestions!
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Mutman
Posts: 73
Joined: Sun Apr 08, 2012 9:57 pm
Location: Krupka, Czech Republic

Re: [HELP] Healing Crystal Red and Green

Post by Mutman »

I would find use for dark blue and dark purple/violet :)
Runebooks: http://www.nexusmods.com/legendofgrimrock2/mods/13/? for Legend of Grimrock 2
Runebooks and books: http://grimrock.nexusmods.com/mods/217/ for Legend of Grimrock 1
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Neikun »

I'm getting a feeling like dark crystals are wanted then.
I wonder if I can pull off a translucent crystal.
I'll need some help from Diarmuid to set up the scripts for making crystals in a new material.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Xanathar »

Hi guys
I'm doing a similar thing in my dungeon (just with big floating runes instead of crystals).

I'm scripting the runes as standard crystals, and using the following script to handle all kind of clicks (inspired by Antti suggestions).

I'm sure there are pros in your approach, but reporting it here just in case it can help you. It can also be a way to detect clicks in the future:
SpoilerShow

Code: Select all

lastx = 0
lasty = 0
lastf = 0
lastl = 0
lastS = nil

-- This must be called by the onGui handler
function onClick(g)
	-- check if party moved. Use this way to handle also changing facing by mouse look
	if (party.x ~= lastx) or (party.y ~= lasty) or (party.facing ~= lastf) or (party.level ~= lastl) then 
		local dx, dy = getForward(party.facing)
		local Sx = grimq.from(entitiesAt(party.level, party.x + dx, party.y + dy))
			:where("class", "Crystal")
			:first()
			
		if (Sx == nil) then
			lastS = nil
		else 
			lastS = Sx.id
		end
	end

	if (lastS == nil) then
		return;
	end
	
	local S = findEntity(lastS)
	
	if (S == nil) then
	    return; 
	end

	if (g.button(lastS, 0, 0, g.width, g.height)) then
		local pX = g.mouseX / g.width
		local pY = g.mouseY / g.height
		
		if (pX < 0.33 or pX > 0.66) then
			return
		end

		local item = getMouseItem()
		
		if (item == nil) then
			if (pY > 0.75) then
				local pickup = grimq.from(entitiesAt(party.level, party.x, party.y))
				:where(grimq.isItem)
				:where(function(f) return f.facing == party.facing; end)
				:first()
				
				if (pickup ~= nil) then
					local mi = grimq.copyItem(pickup)
					pickup:destroy()
					setMouseItem(mi)
					return
				end
			end
			party:heal()
		else
			activateShrine(S, item)
		end
	end
end

function activateShrine(S, item)
        -- placeholder
	hudPrint("used item " .. item.name .. " over shrine " .. S.name)
end

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
User avatar
DeDy
Posts: 132
Joined: Sun Oct 07, 2012 3:41 pm
Location: Brno, Czech Republic

Re: [HELP] Healing Crystal Red and Green

Post by DeDy »

Nightfall: First Contact is finished and I would like to put the red and green crystal. Please, is there a chance that the crystals within a week of release?
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Diarmuid »

We should release of first version of the crystals probably tomorrow. Just a last check run to see if everything's ok with the scripts, and pack the whole thing.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Neikun »

The best part of the crystal scripts is that it will become very easy to make your own.
We have five colours at the moment, and if you want to make a new one, it's very easy.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [HELP] Healing Crystal Red and Green

Post by Eleven Warrior »

Hi guys :)

I would like to know if the Colored Crystal were finished? I have downloaded the Crystals Pack from the Nexus, but it does not have the 5 or 6 colored crystal in it. I would realy like to get a hold of these colored crystals Please :)

Thxs :)
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [HELP] Healing Crystal Red and Green

Post by Eleven Warrior »

Errrrr yes those one thxs, I did not see them on the site :oops:
Post Reply