1) Put a script effect on the spell the player casts that checks for your variable, and plays the fire damage effect on the player if the cast is meant to fail.
2) If the cast doesn't fail, move an activator to the player, and have it cast the targeted fire spell at the player's crosshair target.
Thats actually a good idea, the problem is getCrosshairRef returns only a reference that is within a certain distance of the player. Is it possible to cast the spell to the direction I'm looking rather than at a specific target?
after reading the cast function description, I dont think its feasible, because it requires a target reference