[Papyrus] Cast Spell not working for Aimed spells?

Post » Mon Jun 18, 2012 9:49 pm

The Creation Kit Wiki states that Aimed spells, if not given a target, still fire off in the default direction. By default, the default direction for the player is directly in front of them. Even with the target specified, the Spell will not have any effect. In addition, or perhaps as the actual problem: Stagger effects aren't staggering.

I see no difference between my Stagger effect and the Unrelenting Force stagger effect. Both are of the Stagger archetype, both do 1.5 Magnitude stagger to targets that aren't immune to that level of unrelenting force.

Any help or insight would be appreciated.
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Mon Jun 18, 2012 7:47 pm

My stagger spell seems to work fine when cast from a spell. I set it to a self cast fire and forget, also I believe it must be of archetype "stagger" or something. I believe that for stagger the magnitude is between 0.1 and 1, anything above that just seems to play the same animation.

Just add a property to the script of type spell, link to your spell with the stagger magic effect on it and then do a:

myProperty.Cast(target, source) - target and source can both be the guy you are trying to hit

Can't remember the exact syntax but working fine for me. The only thing I will say is that it doesn't work well against the player, only against NPCs.
User avatar
Josh Dagreat
 
Posts: 3438
Joined: Fri Oct 19, 2007 3:07 am

Post » Mon Jun 18, 2012 9:12 am

What's the difference between your spell and mine I wonder? Mine is being cast off an enchantment on a weapon but since they're being force-cast...

I'm using vanilla spell effects/spells on this. Even force-casting Unrelenting Force doesn't seem to stagger or project the voice power despite my setting the projectile and such up in the Magic Effect.
User avatar
Antonio Gigliotta
 
Posts: 3439
Joined: Fri Jul 06, 2007 1:39 pm

Post » Mon Jun 18, 2012 9:21 pm

make sure the magic effect is archetype stagger. Also I know it seems stupid but make sure you have the hit FX enabled so you can 100% confirm that the spell is hitting the target, then you will know it is the stagger effect itself causing the problem and not the script.
User avatar
Brittany Abner
 
Posts: 3401
Joined: Wed Oct 24, 2007 10:48 pm

Post » Mon Jun 18, 2012 2:01 pm

That makes things very difficult, then. The enchantment relies on a variety of spell effects; all of which have different sources, archetypes, and effects all being circumstantially cast. It seems that I'll have to be doing quite a lot of scripting in Papyrus to get this functional and, even more potentially frustrating, I would need to be able to modify how much the spell staggers at any time (so that I could set it to 0 for effects that don't stagger) and thus I'll probably have to hard-code magic numbers into the script to control that; assuming I can even get at the magnitude of a spell/the magic effect and change it before it goes into effect on the strike.

Why, I wonder, did they not allow spells to be self-contained? All the spells I'm calling have the proper effects and archetypes already. It seems very arbitrary to not allow a Stagger effect to go off simply because the parent (dummy) Magic Effect calling it is of the Script or Slow Time archetype.

Perhaps I'm simply not understanding something crucial about spells and magic effects?
User avatar
CArlos BArrera
 
Posts: 3470
Joined: Wed Nov 21, 2007 3:26 am

Post » Mon Jun 18, 2012 9:04 am

A spell can have multiple magic effects on it. So you might create the following magicEffects:
- Frost damage
- fire damage
- stagger

Then on your spell you just add all three as seperate effects.

Also you can't change teh magnitude on the fly like that, you would have to create say 3 seperate magic effects with a different magnitude of stagger. A pain yes but you will soon learn that bethesda modding is the endless search for the next workaround to a bug/limitation.
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm

Post » Mon Jun 18, 2012 11:12 pm

Augh. That's a lot of pain, yes, given that the base number of unique effects on the weapon is the number of player-available shouts in the game, plus variants that change depending on the weather and also whether the player is power attacking or not.
User avatar
rebecca moody
 
Posts: 3430
Joined: Mon Mar 05, 2007 3:01 pm


Return to V - Skyrim