Jump to content

Remove Light Effects from a spell?


Tarva759

Recommended Posts

It only lowers my fatigue by 1 and for a single second. Could you take a look at my spell?

 

 

 

Scn aaaStagger

 

 

Begin ScriptEffectStart

ref self

Set self to GetSelf

If (self. Get Dead==O)

Self.PlayGroup Stagger,1

Player.Ref ModActorValue Fatigue -35

 

Endif

End

 

 

I've never touched ModActorValue before so I'm sure I missed something basic

Link to comment
Share on other sites

You have a misstype, it should be "PlayerRef.ModActorValue Fatigue -35". With OBSE, ModActorValue2. Also you must declare a variable before begin block.

Scn aaaStagger
ref self

Begin ScriptEffectStart
   set self to GetSelf
   If (self.GetDead == 0)
      Self.PlayGroup Stagger,1
      PlayerRef.ModActorValue Fatigue -35
   Endif
End

In scripts you can also use PlayMagicShaderVisuals and StopMagicShaderVisuals for playing shader effects.

Link to comment
Share on other sites

Well, there are multiple things that need changing in that script:

scn aaaStagger

ref self ;variables need to be declared before Begin block

begin ScriptEffectStart

set self to GetSelf

if self.GetDead == 0
    self.PlayGroup Stagger 1
    PlayerRef.ModAV2 Fatigue -35   ;PlayerRef is one word, without the dot. You need to use ModAV2, because regular ModAV will change the wrong part of Fatigue actor value and you will be stuck with it until it's undone by script
endif

end

Other things to note:

1. ModAV2 is an OBSE command, so you'll need to launch CS with OBSE

2. Using "PlayGroup Stagger 1" can cause a bug where an actor won't use other animations afterwards. To prevent this, you need to wait until stagger animation is finished and then call "PlayGroup Idle 1"

Link to comment
Share on other sites

Thank both of you for the script notes, I'm sure there's a lot of basic things like that I don't know.

I'm trying to avoid OBSE until I'm knowledgeable enough to really take advantage of it. Is there anything I can do with just the CS to simulate Dam Fatigue?

Link to comment
Share on other sites

Add ScriptEffectUpdate block then. This will damage fatigue as long as spell is active.

Scn aaaStagger
ref self
int fatigue

begin ScriptEffectStart
   set self to GetSelf
   if (self == player) && (self.GetDead == 0) ;player only
      self.PlayGroup Stagger 1
      PlayerRef.ModActorValue Fatigue -35
   endif
end

begin ScriptEffectUpdate
   set self to GetSelf
   if (self == player) && (self.GetDead == 0) ;player only
      set fatigue to player.GetAV Fatigue
      if fatigue > 0
         PlayerRef.ModActorValue Fatigue -1 ;damage player's fatigue further
      endif
   endif
end
Link to comment
Share on other sites

I'm afraid that won't work. Using regular ModAV command will change "script" modifier of Fatigue AV, leaving it reduced permanently (or rather until you restore it by script, it won't regenerate naturally).

You need to use ModAV2 (or ModAVMod, which is also an OBSE command) to change the "damage" modifier - it's the same one affected by Damage Fatigue magic effect.

Link to comment
Share on other sites

A lot of stuff in Oblivion is built this way, object oriented, several different things pointing at one single source, nested... It is a shame we cannot make new Magic Effects, as that would have solved it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...