Jump to content

Get the soul size of the target of a spell


Recommended Posts

Strange, I loaded a mod where I'm using it for OnMagicApply event and it still working as intended, maybe there is some limit that I'm not aware about.

 

I searched both the Wiki and OBSE lists of blocktypes and didn't find it. Then I did a Google search and see it mentioned for Skyrim. I dunno. Maybe you found an undocumented blocktype.

Link to comment
Share on other sites

It's not a block type, it's an event type. If you look into OBSE_command_doc html file and click on Event Handlers in Table of Contents, you will be in Event Handler Functions section. There is a tab titled Events in which every type of event is described, including this type I speak of. For some reason this file isn't included in latest archive of OBSE and the latest version is made for 22.5.

 

And I must say you were right about using GetSelf command. I made some tests and except OnMagicApply, GetSelf behaves as return command it seems (commands before seems working in the script) in other types I tested (for now we spoke of, OnMagicEffectHit and OnSpellCast).

Link to comment
Share on other sites

It isn't working perfectly. I had a situation 2 nights ago where a NPC cast a soultrap at another every 5 secs or so, and I saw the message each time.

 

I saved there and went to add a PrintC to find out who the target is, but when I started back up, the NPC stopped casting the spell. Hasn't happened since.

 

So, I have no idea how OBSE deciphered the object::PlayerRef paramter. Looks like it ignored it (which would be my 2nd preference). At least the 2nd param worked to filter for the STRP command.

 

I hoped that it would work like it does for the OnHit event:

 

From the OBSE doc:

For instance, to handle events involving the player being hit by another actor, use SetEventHandler OnHit yourScript ref::playerRef. To handle events in which the player, and only the player, hits anyone else, use SetEventHandler OnHit yourScript object::playerRef.
Edited by GamerRick
Link to comment
Share on other sites

  • Recently Browsing   0 members

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