On Target Spell not actually firing on target

Post » Wed Jun 20, 2012 11:00 pm

So, I have created an area of effect stagger, but one that does not automatically staggers targets, but instead runs a check on them to give a chance to stagger based on the target's stats.

So the script checks the target, and if it succeeds, it casts a stagger spell.
The function is of course:
Staggerspell.cast(game.getplayer(), target)

However, that seems to only work if the player is directly looking at the target. Which is strange, because the I created a custom "stagger" spell that is fire&forget, target actor. Yet it behaves as if it is aimed. Any thoughts on this?
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Wed Jun 20, 2012 10:34 am

Did you check Area Effect Ignores LOS on the spell?
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Wed Jun 20, 2012 7:36 pm

Did you check Area Effect Ignores LOS on the spell?

No, but it is neither an Area effect, nor should the LOS be a problem. I have line of sight to my target, but i have to specifically aim at the target too. That's what bugs me.
I am thinking of just scrapping the whole script Idea and just doing an AOE stagger without checks. This has proven way too much hassle for such a simple effect.
User avatar
Saul C
 
Posts: 3405
Joined: Wed Oct 17, 2007 12:41 pm

Post » Wed Jun 20, 2012 10:32 am

An example of a 'Target Actor' actor spell is the 'Heal Other' spell in the game. There's nothing wrong with it. It's supposed to work exactly the way you're saying it works (close range aimed spell without a projectile).

If you didn't want an AoE, and the actual 'Target Actor' is not working for you, what exactly did you want to happen?
User avatar
Hearts
 
Posts: 3306
Joined: Sat Oct 20, 2007 1:26 am

Post » Wed Jun 20, 2012 11:18 pm

An example of a 'Target Actor' actor spell is the 'Heal Other' spell in the game. There's nothing wrong with it. It's supposed to work exactly the way you're saying it works (close range aimed spell without a projectile).

If you didn't want an AoE, and the actual 'Target Actor' is not working for you, what exactly did you want to happen?

Yeah I just read that too. Serves me well for not reaing the wiki properly. Thansk anyways :wink:.

I just assumed that it would be stupid to have an Aimed effect and a target Actor effect when you can just use an "empty projectile" to have exactly the same effect. But I guess changing projectile speed was bejond the possibilities...

I want a conditional (scripted) stagger effect that is triggered by dispelling your shield and staggers anyone in a 25ft radius that fails a certain condition, which is based on the shields magnitude. It should also stagger them if they stand behind you. The only thing to do that is to apply the effect to each target individually and apply the "stagger" to each individual target. That is only possible via a single-target-spell. Maybe If they cast it on themselves? But I am not sure if stagger even runs on self.
User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Wed Jun 20, 2012 9:21 pm

The conditions are also possible with AoE spells. Have a look at some of the master level spells. For example, CallToArms is an illusion 100 spell that is AoE and only works on NPCs friendly to the player.
User avatar
Danny Blight
 
Posts: 3400
Joined: Wed Jun 27, 2007 11:30 am

Post » Wed Jun 20, 2012 4:48 pm

The conditions are also possible with AoE spells. Have a look at some of the master level spells. For example, CallToArms is an illusion 100 spell that is AoE and only works on NPCs friendly to the player.

I know the conditions work. But I am doing scripted conditions, and these need to apply for every individual actor. And since I can only check them OnEffectStart, I need 2 spells.

Btw I just tried using the "simple" way and just having an area stagger spell on self: Still fires on target location. The spell is cast via:
stagger.cast(game.getplayer(), game.getplayer())

Effect type fire and forget, self.

I have no Idea why it STILL fires like it's aimed...
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am

Post » Wed Jun 20, 2012 12:27 pm

Did you do what Xetrill suggested, and check the 'Area Effect Ignores LOS'?

BTW, how do you find the magnitude of the ward spell? (I assume you're talking about a ward spell since you said you were dispelling a shield.)
User avatar
*Chloe*
 
Posts: 3538
Joined: Fri Jul 07, 2006 4:34 am

Post » Wed Jun 20, 2012 9:37 pm

Did you do what Xetrill suggested, and check the 'Area Effect Ignores LOS'?

BTW, how do you find the magnitude of the ward spell? (I assume you're talking about a ward spell since you said you were dispelling a shield.)

Trying that now, But I doubt this has anything to do with it. The Flag is pretty self-explanatory: It makes the AOE go through walls, which is not what I intend to do.

I used a "dispel" to find the magnitude:
predr = game.getplayer().getav("damageresist")dispel.cast(game.getplayer(), game.getplayer())postdr = game.getplayer().getav("damageresist")magnitude = predr - postdr

And therein lies part of the problem, since this portion needs to run on the player, unaffected by whether or not it hits anthing, while the rest has to run on the targets. Will probably need a global for that, even though I tried not to use one.
Still need a way to apply the stagger reliably though.

Edit: Ok, I stand corrected: checking "area effect ignores LOS" works. I have no clue why that works, because it sure is not what the Flag says it does, but it works. So the simple version works now. Now the question is: Does that also fix the targeting problem?
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Wed Jun 20, 2012 11:48 am

I was just testing right now, and couldn't get AoE stagger to work unless I added another AoE effect to the spell. But once I added one (FireDamageFFSelfArea100), people started staggering. It works for if they're behind you, behind walls, whatever.
User avatar
ladyflames
 
Posts: 3355
Joined: Sat Nov 25, 2006 9:45 am

Post » Wed Jun 20, 2012 3:14 pm

I was just testing right now, and couldn't get AoE stagger to work unless I added another AoE effect to the spell. But once I added one (FireDamageFFSelfArea100), people started staggering. It works for if they're behind you, behind walls, whatever.

Strange, mine works, and it has only a stagger effect attached.
It's not that the spell does not hit targets behind me. Without the flag, I need to aim at some point on the floor for the spell to fire, otherwise it will not fire. The target can be in plain sight in front of me, but if I aim slightly above it's head, nothing will happen.
So if you add fire damage, it works without the flag checked?

btw I also discovered you can stagger yourself.
User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Wed Jun 20, 2012 6:35 pm

The AoE stagger I used was a target self spell, not target area. Maybe that's why. And yes, I had to add a condition to the effect (GetIsID Player == 0).

I suppose it can be changed to 'GetIsReference [Target] == 0'. Target is the caster of the spell, right?

EDIT:

I did some more testing, and I think that self-targeting area of effect lesser powers that are of script or stagger effect archetypes (and possibly some other types) don't work unless paired with another area of effect magic effect of value modifier archetype (and possibly some other types).

It seems very specific, but that's what I use to test things out all the time.
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm


Return to V - Skyrim