Jump to content

Adding script to a potion object (not magiceffect)


SKKmods

Recommended Posts

I would like to add a script to a poition object to trigger OnContainerChanged, but the script box on the Poition form seems to not function.


Of course changing object container does not trigger consumption to chain the normal attached magiceffect.


Adding an inventory event filter to every actor in the target audience (all humans in the game) is impractical.


Any cunning workarounds ?

Link to comment
Share on other sites

What do you mean by "seems to not function" ?

 

Open any ALCH potion form.

 

Click Script dropdown or [...]

 

See what happens ... nothingm no scripts UI == "seems not to function".

 

Hmm... What's your goal?

 

To detect when a consumable ALCH potion object changes container.

 

Typically from Player AID item inventory > any arbitrary NPC in the world.

 

But could be any arbitrary container to any arbitrary container in the game which is why an object attached script is needed.

 

I have already tried a MISC item with locally attached script as an OnContainerChanged proxy, but, the player cant activate a MISC item in inventory to "consume" as an ALCH.

Link to comment
Share on other sites

Sounds like a dead end. I remember trying direct potions scripts too but to no avail.

It might be possilbe to use books as a template and apply potion effects via script, but then it doesn't show up in the Aid section

Link to comment
Share on other sites

Ah.

 

Yes, the magic effect (which can has a script) will not help in your use case.

But, how about attaching the container change detection script to an Alias/RefAliasCollection and then adding any tracked Potion(s) to that?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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