**** begin OnMagicEffectHit FIDG ****

Post » Mon May 17, 2010 2:14 pm

I am trying to find a good solution to run this check ( begin OnMagicEffectHit FIDG )
on the player, to catch any firespells that hit.

if i try to run it from a quest script it wont run.

and I do not know if an object script can be attached to the player, i do not think so.

one possibility would be an invincible activator to carry with the player around him, but i doubt this
would work well.

Isnt there any other way not described on the CS WIKI pages how to check
if the player has been hit by a certain magic effect or any other hit which causes damage?

And if, is there a possibility to retrieve infromation about how much damage was done?


HasMagicEffect FIDG
would not work well for detecting those magic effects with duration 0.
User avatar
Emma
 
Posts: 3287
Joined: Mon Aug 28, 2006 12:51 am

Post » Mon May 17, 2010 9:38 am

What about a spell effect tied to an ability?
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm

Post » Mon May 17, 2010 10:41 pm

What about a spell effect tied to an ability?


ops, sorry, dunno what you mean by that?

my question was, how to trigger any magic effects that hit the player like the FIDG (fire damage), even when duration is set to 0.
I dont know how this is related to your answer, my knowledge lacks. :shrug:


ah wait. you mean a spell effect like an constant ability can be used like a collision box for the player?
and run the
begin OnMagicEffectHit FIDG
...
end

block?
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Mon May 17, 2010 11:14 am

I need help. It doesnt work.
Did try the following code snippet, its a script effect , as part of a ability cast on the player:

ScN egmWeaknessFire


begin OnMagicEffectHit FIDG

if (player.GetDead)
RETURN
endif

if (egmV.bWater)
PrintC "EGM WEAKNESS FIRE HIT!!!!!!!!!!!"
let egmwaterlevel += 5
endif

end

But it doesnt trigger if hit by any fireball.
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Tue May 18, 2010 12:46 am

I just noticed that

OnMagicEffectHit

wouldnt even work if no spelltype is specified.
Both Blocktypes of this kind dont react, but ScriptEffectStart runs,
and return the player as valid calling ref.

 ScN egmWeaknessFireref Mebegin OnMagicEffectHit FIDG        if (player.GetDead)		RETURN	endif	if (egmV.bWater)		PrintC "EGM WEAKNESS FIRE HIT!!!!!!!!!!!"		let egmwaterlevel += 5	endifendbegin OnMagicEffectHit 	if (player.GetDead)		RETURN	endif	PrintC "HIT by MAGIC EFFECT"end	Begin ScriptEffectStartset Me to GetSelfif (Me.GetIsReference Player == 1)        PrintC "This is THE Player!!"else	PrintC "This is NOT the Player!!"endif end

User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Mon May 17, 2010 9:03 pm

any new ideas on this? :rolleyes:
User avatar
Shae Munro
 
Posts: 3443
Joined: Fri Feb 23, 2007 11:32 am

Post » Mon May 17, 2010 4:17 pm

any new ideas on this? :rolleyes:

Block types like OnMagicEffectHit are only valid in scripts attached to references.
You can either attach a script to the player (not at all recommended), or use OBSE's active effect functions to determine when the player is affected by a FIDG effect.
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Mon May 17, 2010 6:14 pm

It depends on what you're trying to do. If you're trying to make a pseudo weakness-to/immunity/damage-absorbtion script, I can definately help you with that. I recently built a script that reverses frost damage felt by the wearer of a certain item, and it would be extremely simple to convert it to fire damage.

If I tweak my script a little, I could possibly get it to trigger when the player is struck by fire damage, similar to OnMagicEffectHit, but it would only work if you don't mind setting the spell in question's magnitude to 0, or to a negative value (healing the player instead of harming), otherwise my script has no way to tell the difference between new effects and previously present effects.

Of cource, it requires OBSE.
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am


Return to IV - Oblivion