Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Weird activator behavior with different NIFs


syscrusher
 Share

Recommended Posts

So, I am trying to make an activator that gives the player a modest buff, akin to the things you get from Ayleid wells and such. I have one such already defined and working, using a vanilla NIF.

With vanilla NIFs, the script from my existing activator and my new (second) script work perfectly.

With any custom static NIF -- and I've tried several from different mods -- the activator script runs and pops up the appropriate dialogs but does not cast the spell.

With the CollisionBox01 from the vanilla meshes, I can replicate the bug -- script runs, dialog box appears, no spell.

With a vanilla tombstone mesh as a test, the object at 1X and 2X scale works as intended, but scaling it up to 8X causes it to exhibit the bug.

I've replicated the behavior -- both "working with standard NIF" and "broken with custom NIF" using *each* of my two scripts.

Anyone seen this before? I would think that once the activation is detected and the script invoked, the NIF itself would be irrelevant. Apparently not.

Link to comment
Share on other sites

An additional data point: Using one of Meo's static clutter items, the spell also works correctly.

Using one of *my* static clutter items, it works correctly.

Apparently it is just certain meshes that won't work, and I'm completely at a loss as to why. I would think that all static meshes are pretty much the same once the system detects the activation.

Link to comment
Share on other sites

Another data point: I made a brand-new object that is just a cylindrical collision mesh, no visible geometry. It works perfectly unless I use it to enclose one of the objects that *doesn't* work. And it works okay scaled to fairly large size. So I'm ruling out scaling of the object and any dependency on visible properties, since this new test object has no visible parts.

Link to comment
Share on other sites

Apparently the spell gets trapped inside the statue or model collision sometimes. If you look at the Night Mother statue in Bravil, you'll see that there's actually an xmarker over her head that delivers the spell. If you try it without, the spell won't work. Sometimes you'll get the flash that the spell fired, but there's no effect on the PC. I tried messing around with the mesh with no luck. I finally had to concede defeat and use an xmarker like Beth did *sigh*

Link to comment
Share on other sites

I think I figured out what's going on! The spell cast by the object originates at the object's origin point. If that origin point is inside the collision mesh of another object, or if the activator object itself has a collision mesh that fully surrounds its own origin, the spell is trapped inside. The recipient of the spell appears to need direct line-of-sight to the origin point of the activator. Very strange. I think I know a way to work around it by using nested activation on another object suspended in the air above.

Link to comment
Share on other sites

Apparently the spell gets trapped inside the statue or model collision sometimes. If you look at the Night Mother statue in Bravil, you'll see that there's actually an xmarker over her head that delivers the spell. If you try it without, the spell won't work. Sometimes you'll get the flash that the spell fired, but there's no effect on the PC. I tried messing around with the mesh with no luck. I finally had to concede defeat and use an xmarker like Beth did *sigh*

This must be it. If you look at my last post, you'll see that I arrived at this conclusion independently just about the time you were posting. I'm headed for bed now (it's 04:00 here), but will try this in the morning. Thanks!

Link to comment
Share on other sites

I was highly amused that our timing was so close on the solution. I checked the forum, went back to troubleshooting and happened to see a tiny bit of the flash effect coming from the center of the object, had my "Aha!" moment. The whole process took less than 10 minutes from when I last checked the forum until I found the answer and was back here to post. AndalayBay slipped the answer right into that narrow time slot. :)

Just about the time you start to think you're a competent modder, you find a weird one like this that makes you humble again. :)

Sys

Link to comment
Share on other sites

Mark it solved! I floated an ordinary Xmarker about 15 meters above the activator. My script now uses GetActionRef to obtain the target ref, then invokes the spell from the Xmarker with code similar to this:

Set target to GetActionRef

MyMagicXmarker.cast MyCustomSpell target

Thanks to everyone who replied. I had forgotten about the Lucky Lady statue; that was very useful as an example on how to do the remote part of the script. I didn't know a static object could cast a spell; I had assumed I would need to use nested activators. Thanks for that tip.

Sys

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...