Jump to content

Amugaba

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Amugaba

  1. This forum's been a huge help so far, so let's try another question...Is it necessary to unregisterForUpdate when a magic effect finishes? My mod is working fine, but when I look at the Papyrus log after it's been running, there is a repeating error: [09/18/2015 - 10:34:41PM] Error: Unable to call UnregisterForUpdate - no native object bound to the script object, or object is of incorrect type stack: [None].aboDamageScaleNPC.UnregisterForUpdate() - "<native>" Line ? [None].aboDamageScaleNPC.OnEffectFinish() - "aboDamageScaleNPC.psc" Line 36This script is a MagicEffect script that looks basically like: Scriptname aboDamageScaleNPC extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) STUFF RegisterForSingleUpdate(0.25) EndEvent Event OnUpdate() STUFF RegisterForSingleUpdate(1) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) STUFF if self != none UnregisterForUpdate() endif EndEventI tried it with and without the self != none, but neither made a difference. Should I just leave the unregister out? After the effect is finished, will the script not execute the next time single update is called?
  2. This is probably really simple, but...how do you get the Actor that a perk is attached to in a Perk script? I'm using SKSE Perk functions to modify a value on the perk based on the an Actor Value. It works fine for only the player if I use Game.GetPlayer(), but I'd like it to work if I add the perk to NPCs too. This might be entirely pointless though if the game doesn't create an instance of a perk for each actor that has it. The goal is for actor A to have perk with value A, and actor B to have the perk with value B. If the perk can only have one value, there's not much point. Anyone know about either of these things?
  3. In perks you can use Entry Points to modify values for certain things just before they're utilized by the game (or at least that's my understanding). My problem is that there's a drop down list with a very limited selection of ways to modify the value. The change I want to make, division by an actor value, isn't available. The formula will be slightly more complicated than this, but bascially: Value *= 1/AV. Value *=AV is available, but not division... Any thoughts on how to make this work? As an alternative, is there a way to access entry points in a script? I looked at events, but there doesn't seem to be an event for entry points. The entry point I need to modify is either Mod Incoming Damage (preferrable) or Modify Armor Rating.
×
×
  • Create New...