Page 2 of 4

Re: [HELP] Healing Crystal Red and Green

Posted: Fri Feb 15, 2013 7:49 pm
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!

Re: [HELP] Healing Crystal Red and Green

Posted: Fri Feb 15, 2013 11:20 pm
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.

Re: [HELP] Healing Crystal Red and Green

Posted: Fri Feb 15, 2013 11:25 pm
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.

Re: [HELP] Healing Crystal Red and Green

Posted: Sat Feb 16, 2013 9:20 am
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

Re: [HELP] Healing Crystal Red and Green

Posted: Sat Feb 16, 2013 11:07 am
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 :)

Re: [HELP] Healing Crystal Red and Green

Posted: Sat Feb 16, 2013 1:31 pm
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:

Re: [HELP] Healing Crystal Red and Green

Posted: Sat Feb 16, 2013 3:40 pm
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.

Re: [HELP] Healing Crystal Red and Green

Posted: Sat Feb 16, 2013 4:48 pm
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

Re: [HELP] Healing Crystal Red and Green

Posted: Mon Feb 18, 2013 10:11 am
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.

Re: [HELP] Healing Crystal Red and Green

Posted: Mon Feb 18, 2013 5:28 pm
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.