Page 1 of 1

detecting spell

Posted: Fri Jun 17, 2016 8:45 pm
by THOM
Is there a way to detect, if a certain spellblast - let's say a fireblast - explodes on a certain tile?

What I need is something similar to a receptor. But in my case the triggering spell shouldn't be a fireball but just a fireblast.

I have fiddled around with the wall-receptor but I was sure that it couldn't be that easy. I assume, the blast cannot trigger the receptor because they are not on the same tile...

Has anyone an idea?

Re: detecting spell

Posted: Fri Jun 17, 2016 9:04 pm
by minmay
WallTriggerComponent only triggers when a projectile hits its ProjectileCollider. Since fireburst is not a projectile, you will not have good luck trying to use it.

Try HealthComponent instead.

Re: detecting spell

Posted: Sat Jun 18, 2016 3:30 pm
by akroma222
Is this Fireburst going to be spawned through a mediating script when casting?? (assuming you are casting it) As in, like:
SpoilerShow

Code: Select all

onCast = function(champion, x, y, direction, elevation, skillLevel)															      
		return aoeScripts.script.areaEffectSpell(champion, x, y, direction, elevation, skillLevel, "fireburst", false, "oneSquare", powerB, nil, 0, "burning")
	end,		
If so then the mediating script could check for the type of tiles included in an AoE ...

Otherwise, if this is for a puzzle, a timer set to 0.001 interval checking the area of interest could detect the fireburst??
Hmm... perhaps some more info on how and why this would be happening? (without giving too much away!)
Definitely, how this fireburst would be spawned (casting or not?) would help

Re: detecting spell

Posted: Sat Jun 18, 2016 4:34 pm
by THOM
The detecting will be part of a puzzle (or a lock).

The spell is casted by the party.

Re: detecting spell

Posted: Sat Jun 18, 2016 8:33 pm
by minmay
akroma222 wrote:Is this Fireburst going to be spawned through a mediating script when casting?? (assuming you are casting it) As in, like:
SpoilerShow

Code: Select all

onCast = function(champion, x, y, direction, elevation, skillLevel)															      
		return aoeScripts.script.areaEffectSpell(champion, x, y, direction, elevation, skillLevel, "fireburst", false, "oneSquare", powerB, nil, 0, "burning")
	end,		
If so then the mediating script could check for the type of tiles included in an AoE ...
[...]
Hmm... perhaps some more info on how and why this would be happening? (without giving too much away!)
Definitely, how this fireburst would be spawned (casting or not?) would help
You are overcomplicating this. The timer approach you mentioned is fine.