Using onhit command to detect flames

Post » Tue Oct 06, 2015 10:57 pm

Hi gang,

Is there a way to use onhit to detect if an object is being attacked by fire or flames? The wiki s not clear on this part at all. Fireballs, fire bolts, flames spells should all be detected as fire in the script.

I appreciate any help.

Tonycubed2
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Tue Oct 06, 2015 6:29 pm

What happens if you stick an onhit activator on the player and then walk him into a pool of burning oil?

You could use a spell effect to attach the event handler. Throw in some trace statements so you can see what gets reported, then off to bleak falls barrow and get careless with some oil flasks.

User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm

Post » Wed Oct 07, 2015 4:38 am

I am attaching the script to the object using a quest event and aliases. That's not the problem.

I need the syntax to detect flames. And only flames, not shock or cold. If the object is hit with flames I will run additional code.
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Tue Oct 06, 2015 4:43 pm

Can you look up the Spell you're hit with?

If so, you could try:

Keyword Property MagicDamageFire Auto  If ( SpellID.HasKeyword(MagicDamageFire) == 1 )EndIf

You'd have to double check, but that should be what they use on all Fire-Damage sources.

User avatar
Ruben Bernal
 
Posts: 3364
Joined: Sun Nov 18, 2007 5:58 pm

Post » Wed Oct 07, 2015 4:20 am


I didn't say you were doing it wrong. I asked what results you got from event handler. The more information we have, the better chance that someone will work it out.
User avatar
megan gleeson
 
Posts: 3493
Joined: Wed Feb 07, 2007 2:01 pm


Return to V - Skyrim

cron