Hazard effects strange results

Post » Thu Jun 21, 2012 8:28 am

Hello All,
I hope someone can help me out here because I am getting very confused.
First of all how come the Wiki page for "Hazard" has been deleted??
I am trying to create multiple spells that have various effects, for example randomly teleporting the actor from -300 units to +300 units on the X and Y angle.
The spell effect works great, I have a magic effect which is attached to a spell. The caster casts the spell which fires a custom projectile, when the projectile hits any solid surface an invisible explosion hits which in turn places a Hazard effect. ( I know long winded ).
The Hazard effect has the following attributes...

Lifetime = 30
Limit = 1
Radius = 30
Target interval = 5
IS radius = 0.0
No flags

Custom art file ( tried to use nifscope to double the size of the circle from the guardian spell... failed! my artistic talents unfortunately are <= 0)
Spell = My custom teleport field spell with attached script.

When I use this in game it works for the most part, the field appears where I target and any opponents caught within have a chance of being randomly teleported around, very good fun :-)
What is confusing the hell out of me is why this effect is not applying to the player?
When it was a constant effect attached to a summoned dummy invisible unit with a CLOAK effect the player and any of my summons etc were effected, now the player is never effected and the summons are only effected sometimes.
I have debug messages in the teleport script to tell me when the effect tries to take place and on whom and the random chance is scripted so it's not being blocked outside of the effect.

Any advice would be greatly appreciated, also any wizards of nifscope who could help me with a couple of custom spell effects for my mod please message me.
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Thu Jun 21, 2012 6:25 pm

Can anyone help update the wiki page, when I get to it all I see is...

16:15, 29 November 2011 http://www.creationkit.com/User:Scornett (http://www.creationkit.com/index.php?title=User_talk:Scornett&action=edit&redlink=1 | http://www.creationkit.com/Special:Contributions/Scornett) deleted "http://www.creationkit.com/index.php?title=Hazard&action=edit&redlink=1" ? (content was: "http://www.creationkit.com/Category:Object_Classes http://www.creationkit.com/Category:Special_Effect")
User avatar
Donatus Uwasomba
 
Posts: 3361
Joined: Sun May 27, 2007 7:22 pm

Post » Thu Jun 21, 2012 10:11 am

If your hazard is attached to a spawn hazard magic effect, it will pass the caster reference to the hazard and the hazard will exclude the caster from any possible targets that may come within range for it to cast the linked spell on.

Alternatively, you could use a projectile (which could be blank) that has some explosion (which could also be blank) and try putting the hazard in the "spawn object" part of the explosion. This may circumvent the hazard excluding the caster from possible targets.

Another option is to try the "targets only player" flag, and have a second magic effect that spawns a second invisible hazard that is the same otherwise as the first except it is invisible and has "targets only player" checked. Then when you cast, the spell should create both hazards at the same time, with one targetting everything but the player, and the other only targetting the player. This might work too.

The final option is to place an activator with a script using an explosion, and use placeatme to place the hazard at the invisible activator.
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Thu Jun 21, 2012 3:19 pm

Thanks Elseagoat, aye I worked out last night that any Hazard that is “Cast” will not affect the caster. I re-wrote the Wiki page last night with some of my findings but I need to do more testing on some of the flags etc.

I already had the hazard attached to an explosion and it still counts as being ‘Cast’ by the player, also ‘targets only player’ does not work if the player is in anyway creating anything to do with the Hazard.

Now I have set the spell to fire an invisible projectile, explosion occurs at the location, the explosion places an invisible actor which then casts the Hazard/Spell at their feet creating the teleport field effect. Only downside is any perk bonus’s etc cannot be easily applied (although I have a work around) and for my scripting checks of the spell effect I have to use a Player Reference rather than just akCaster.

Ah well C'est la vie.

Thank you for your help though, your never short of a work around :-)
User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Thu Jun 21, 2012 6:28 pm

Yea it can be a pain to get spells to work with perks sometimes. Most of my new perks literally do nothing, and I just script my spells to check for the perk to do different things.
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am


Return to V - Skyrim