RomanR Posted April 4, 2023 Share Posted April 4, 2023 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. Link to comment Share on other sites More sharing options...
GamerRick Posted April 4, 2023 Author Share Posted April 4, 2023 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 More sharing options...
RomanR Posted April 4, 2023 Share Posted April 4, 2023 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 More sharing options...
GamerRick Posted April 5, 2023 Author Share Posted April 5, 2023 True that. I looked here first, and when I didn't find it I went searching. Link to comment Share on other sites More sharing options...
GamerRick Posted April 6, 2023 Author Share Posted April 6, 2023 (edited) 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 April 6, 2023 by GamerRick Link to comment Share on other sites More sharing options...
Recommended Posts