PJMail Posted December 25, 2021 Share Posted December 25, 2021 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 More sharing options...
DieFeM Posted December 25, 2021 Share Posted December 25, 2021 Using a consumable will trigger the OnItemEquipped on the actor consuming it, so you can listen for this event on an alias of the player.https://www.creationkit.com/fallout4/index.php?title=OnItemEquipped_-_Actor Link to comment Share on other sites More sharing options...
PJMail Posted December 25, 2021 Author Share Posted December 25, 2021 Very interesting - unfortunately I have no quests attached to the player (and don't want to add one just for this) - but useful to know!Thanks DieFeM Link to comment Share on other sites More sharing options...
niston Posted December 25, 2021 Share Posted December 25, 2021 You can use RegisterForRemoteEvent() to get events from the player without attaching anything to it. Link to comment Share on other sites More sharing options...
GrimGrim31 Posted December 25, 2021 Share Posted December 25, 2021 (edited) Nevermind. You want something other than a potion. Can spells be assigned to quick slots? Edited December 25, 2021 by GrimGrim31 Link to comment Share on other sites More sharing options...
Zorkaz Posted December 26, 2021 Share Posted December 26, 2021 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 Link to comment Share on other sites More sharing options...
PJMail Posted December 26, 2021 Author Share Posted December 26, 2021 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 More sharing options...
PJMail Posted December 26, 2021 Author Share Posted December 26, 2021 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 scriptOooh - 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 More sharing options...
PJMail Posted December 26, 2021 Author Share Posted December 26, 2021 Nevermind. You want something other than a potion. Can spells be assigned to quick slots? Good question, but I don't think fallout4 has spells as a separate item - they usually have to be attached to something. Link to comment Share on other sites More sharing options...
Recommended Posts