Jump to content

Need alternative to a 'potion' (ALCH) to trigger a script


PJMail

Recommended Posts

Background:

I want a craftable item the player can have in their inventory, AND assign to a quick Slot/Favorite (like a stimpak), that runs a script when used.

 

Currently I have an Ingestible (ALCH) with attached MagicEffect that runs the script. Works great EXCEPT when the player has 'SetGhost()' enabled (see this topic).

 

Note that you cannot attach a script directly to an ALCH type object.

 

So, what I am looking for is an alternate Craftable Item that I can directly attach a script to so that when I 'select' it via its quick Slot number it silently runs the script.

 

I am under the impression quick slots only work for Consumables and Weapons - or am I wrong on this?

 

P.S. I want this to work without F4SE (like on an Xbox) so can't use Hotkeys.

 

Anybody have a working idea that doesn't use a MagicEffect?

Link to comment
Share on other sites

You can use RegisterForRemoteEvent() to get events from the player without attaching anything to it.

I am giving that a try after DieFeM's interesting piece of information... That should get around my 'onboard' issues hopefully.

Won't fix it when not onboard and SetGhost has somehow been set on the player (though a whole lot of other gameplay and mods will also break so their game will be rubbish anyway...)

Link to comment
Share on other sites

You could also use a dummy clothing/armor item (E.g. an invisible ring),

that automatically unequips via scripts so you can reequip it again. As far as I remember armor can have its own script

Oooh - nice idea. Probably a bit late in the mod's life to replace an item everyone already created since v1.0 (as you can't convert a formid's 'type' to make a seamless update).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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