Slowing someone down with magic

Post » Thu Jun 21, 2012 4:55 am

Ok I'm working on a spell to slow an enemy down but for some odd reason nothing is having any effect on my enemies. I try setting their speed to 0 or 10 or whatever. I think when I set it to negatives they might have even started speeding up.. Not really sure. Here is the script if anyone has any ideas..

Scriptname PsiDecrepifyScript extends activemagiceffect  PsiNecromancyQuestScript Property PsiNecroQuest AutoInt Property PsiCursedSpeed autoInt Property CursedSpeed autoInt Property EnemySpeedMult autoInt Property ApplyOnceDecrepify autoInt Property CurseBonus autoSpell Property DisMonkeyFinger autoPerk Property CurseMastery autoPerk Property CurseMastery2 autoPerk Property CurseMastery3 autoPerk Property CurseMastery4 autoPerk Property CurseMastery5 autoEvent OnInit()Debug.Messagebox("Decrepify Script is running!")EndEvent;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;   Events Starting Magick Effect;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Event OnEffectStart(Actor AkTarget, Actor Caster);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;   Get Player Perk Bonuses;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;if (Game.GetPlayer().HasPerk(CurseMastery))	CurseBonus = 10Endifif (Game.GetPlayer().HasPerk(CurseMastery2))	CurseBonus = 20Endifif (Game.GetPlayer().HasPerk(CurseMastery3))	CurseBonus = 25Endifif (Game.GetPlayer().HasPerk(CurseMastery4))	CurseBonus = 30Endifif (Game.GetPlayer().HasPerk(CurseMastery5))	CurseBonus = 35Endif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Get Random Ints for resist and such;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	if AkTarget.HasSpell(DisMonkeyFinger)		CurseBonus = (CurseBonus + 5)	endif	Actor TargetActor = GetTargetActor();;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Define Enemy;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	EnemySpeedMult  = TargetActor.GetAV("SpeedMult") as int	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	if ApplyOnceDecrepify == 0		Debug.Messagebox("Your enemies speed is" + EnemySpeedMult)		CursedSpeed = (500 + CurseBonus)		CursedSpeed = (EnemySpeedMult - CursedSpeed) as Int		AkTarget.SetAV("SpeedMult", CursedSpeed)		Debug.Messagebox("Your target has been afflicted with Decrepify! Speed reduced  reduced by" + CursedSpeed)		ApplyOnceDecrepify = 1	endifEndEvent

Needless to say when it wasn't working Ive gone through and changed the variables for the cursed speed to straight up numbers and didnt get desired effect still. And Ive tried both AkTarget and TargetActor.SetAV
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Thu Jun 21, 2012 5:38 am

You could try this:
Scriptname DamageCarry extends activemagiceffectproperty int durationEvent OnEffectStart(Actor Target, Actor Caster)   int CarryCap = Target.GetABaseAV("CarryCapacity") (I don't remember what that AV is called, but its something like that)   Target.SetAV("CarryWeight", 0)    Utility.Wait(duration)    Target.SetAV("CarryWeight", CarryCap)    self.dispel()endEvent
User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm

Post » Thu Jun 21, 2012 12:37 pm

I vaguely remember reading somewhere that you need to add and remove an item or do something that affects carry weight to get the actor to update its speed properly.
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Thu Jun 21, 2012 11:12 am

What about using the magic effect from the Slow Time shout? It'd affect everything of course, but it might be something to consider as a last resort.

Can't believe I didn't think of this. What about the effect from Ice spells that slows you down? The 'on target' one is called FrostSlowFFAimed. Its magnitude seems to be the percentage of how much it slows you down, and the duration is pretty obvious as to what it does.
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Thu Jun 21, 2012 6:48 am

Actually I tried the one from the ice spells and it didnt do jack..

I tried everything from 1 to 99 for magnitude with the Frost Slow spell effects and I saw no noticeable difference.

Ive had lots of luck with INCREASING speed with changing speedmult but absolutely no real noticeable difference with slowing someone down.

I might try the Set carry weight to 0 and add an item at the same time and see how that goes..
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am

Post » Thu Jun 21, 2012 2:07 am

Actually that did not work either.

Scriptname PsiNoCarryweight extends activemagiceffect  Armor property thing autoEvent OnEffectStart(Actor Target, Actor Caster)   int CarryCap = Target.GetAV("CarryWeight") as int   Target.SetAV("CarryWeight", 0)   Target.addItem(thing)    Utility.Wait(100)    Target.SetAV("CarryWeight", CarryCap)    self.dispel()endEvent
User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am


Return to V - Skyrim