[HELP] Healing Crystal Red and Green

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [HELP] Healing Crystal Red and Green

Post by Komag »

Diarmuid wrote:I was throwing quick info around for people to catch, sorry I don't have much time to explain everything in detail :roll: . I am also not sure how to redefine alcoves/altars clicking zones. If someone (Neikun?) could supply me with the altar object (an invisible object that has a clickable area roughly the size of the crystal), I'm up for preparing and setting up the crystal projectile system for the community to use.
no offense meant, just saying your amazing coding is often so far beyond me that I'm sure others might feel as dumb as I do sometimes when we see what really smart people are capable of!
Finished Dungeons - complete mods to play
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 »

I belong among those less nimble in terms of programming. I can't do this. A tribute will be all Blue Crystal. Thanks for info.
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
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 »

Fear not. Diarmuid and I are collaborating on version for the public to use. He's just a little short on time at the moment.

It occurs to me that in making a green and red version of these, you will lose the shader. I have a potential work around that really depends on your not using the green_slime material for the slime intended.

We would redefine the material and give it all crystal maps. It would then have a green coloured shader.
Same thing can be done with the red_gem material.

If you could, I'd like to have access to your new maps and particles.
"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
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 »

This is all coming along quite nicely:

Image

Model, shading and animation are done and the crystal heals the party. By the way, I discovered a veeeery interesting property of altars/alcoves and clicking zones that I wasn't aware of, and the crystal now responds to it being clicked upon at an almost pixel-precise clicking area.

All that's left is to create a "dead" version and create timers to reactivate the crystal. Someone know what's the delay it takes the crystal to recharge?

Here's a video too: http://youtu.be/ikr9XHhFH-A
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [HELP] Healing Crystal Red and Green

Post by Komag »

Diarmuid wrote:By the way, I discovered a veeeery interesting property of altars/alcoves and clicking zones that I wasn't aware of, and the crystal now responds to it being clicked upon at an almost pixel-precise clicking area.
I'm interested :)
Finished Dungeons - complete mods to play
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 »

Diarmuid wrote:This is all coming along quite nicely:
Here's a video too: http://youtu.be/ikr9XHhFH-A
I don't understand at all how it's done, but the execution is clearly functional :) :shock:
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 »

Komag wrote:
Diarmuid wrote:By the way, I discovered a veeeery interesting property of altars/alcoves and clicking zones that I wasn't aware of, and the crystal now responds to it being clicked upon at an almost pixel-precise clicking area.
I'm interested :)
Well, Neikun made me an altar object with such properties for the target:

targetPos = vec(0, 0, 0),
targetSize = vec(1.5, 3, 1.5),

I thought it would be enough to enable the clicking zone, and put an invisible shield as the fake item, but it didn't respond because I didn't click on it (the shield was lying on the ground, not floating). So reaction to the mouse looks like it's determined by a raycasting and colliders system, which means that the object is picked up from the altar/alcove only if the mouse is exactly ON it (or the defined collider in the model). So what I did is use an invisible version of the whole crystal as the object that is placed on the altar and the mouse responds the same contour as the visible one.

In short: putting an invisible version of a model on an altar at 0,0,0 targetPos creates a clickable zone of that model size & shape.

But then again it's the first time I play with alcoves, so that was probably common knowledge for guys like Neikun.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [HELP] Healing Crystal Red and Green

Post by Komag »

Hmm, that fits with my experience even though I never really realized it. I know that if you have an item anchor in a far away offset, you can get it out of the alcove by clicking the item far away, but have to go back in front of the alcove to put it back in. I think this is a similar deal, clicking the actual item to take out
Finished Dungeons - complete mods to play
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by antti »

Whoa, an altar certainly is an interesting workaround for the issue! I would have never though of that 8-)

Another approach would be to do this with a custom GUI. When party moves, check if the party is facing a crystal. If it is, add a big transparent button on the screen (keeping it in mind that people might have displays with different resolutions/aspect ratios), which runs the script that heals the party.
Steven Seagal of gaming industry
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 »

Ha, thanks for the tip, antii. Be we managed to solve everything out, after an intense brainstorming session with Neikun and msyblade.

So now we have a fully working crystal recreation, that even has the exact animation of the original, including crystals moving up/down and rotating around their axis. It's not just projectiles anymore, but an hybrid of an altar, a pit, a projectile, an item, ligthsources, timers & gratings. :shock: 8-)

All the scripting is done, and neikun's off to make multiple colors so we can release a pack for the community.
Post Reply