skyrimfoxmods Posted October 28, 2019 Share Posted October 28, 2019 Hi, I am trying to make a mod that when you hit a target, you will spawn a different explosion near/on the target instead of the explosion attached to the bullet. I found an old post (see below) and tried it but no luck to making it work. . . . Omod -> ench -> Constant/Self Magic effect -> Perk -> Apply Spell on Hit -> spell -> Fire/Forget & Constant Magic Effect -> Script and the script is super simple now:extendactivemagiceffect yadayada Actor Property PlayerRef AutoExplosion Property ExpShell AutoEvent OnEffectStart(Actor akTarget, Actor akCaster) akTarget.Placeatme(ExpShell)EndEvent Ok here is how I did the process based on the steps shown above.1. Made a magic effect and set the parameters to: -Script -Fire/Forget (although the guide says Constant Magic Effect but I am not able to attach the magic effect to the spell unless the parameters set are the same so I assumed that I should follow the spell parameters since it is higher on the list.) -Contact -I copy pasted the script above and chose the explosion I want to spawn. Then I left the playerref blank since it needs to have an alias on the properties drop down menu and he did not specify that you make a quest alias. 2. Attached the magic effect to the spell with the same parameters. 3. Made a perk and attached the spell via perk entries with the parameters selected at the entry point: - Apply combat hit spell - select spell - Spell with the attached magic effect script -The rest was default 4. Made another magic effect with the parameters" - Since he did not specify what is the effect archetype, I left the default parameter on which is Value Modifier. - Constant Effect - Self - Attached the perk under Perk to Apply. -The rest was default 5. Attached the magic effect with the perk attached to it to an enchantment with the same parameters. 6. Attached the enchantment to a weapon mod. Tested it but nothing happens. Link to comment Share on other sites More sharing options...
hereami Posted October 28, 2019 Share Posted October 28, 2019 Check if the script compiles, normally there should be "Scriptname myScriptName extends ActiveMagicEffect"Also, for that simple purpose may use an existing game script holdupAddExplosionScript. Also there may exist another perk with the same entry "Apply combat hit spell", which does suppress yours - unless you differentiate them by specifying mutually exclusive conditions, first perk wins - those entries' effects do not sum up. Even simpler, if using OMOD (thus manual weapon modification) - just specify your hit spell as an Enchantment - FireForget/Touch - there is no real need to use perk in this case, it is mostly invaluable, when don't want additional user actions (e.g. attach a mod to a weapon). Link to comment Share on other sites More sharing options...
skyrimfoxmods Posted October 28, 2019 Author Share Posted October 28, 2019 Check if the script compiles, normally there should be "Scriptname myScriptName extends ActiveMagicEffect"Also, for that simple purpose may use an existing game script holdupAddExplosionScript. Also there may exist another perk with the same entry "Apply combat hit spell", which does suppress yours - unless you differentiate them by specifying mutually exclusive conditions, first perk wins - those entries' effects do not sum up. Even simpler, if using OMOD (thus manual weapon modification) - just specify your hit spell as an Enchantment - FireForget/Touch - there is no real need to use perk in this case, it is mostly invaluable, when don't want additional user actions (e.g. attach a mod to a weapon). The script compiles. Btw is Holdupexplosion for the intimidate perk and I need that perk to trigger it right? I tried using the script above with the fire and forget set up and directly attaching it to an omod via an enchantment but it does not work.Btw found this while checking out holdupexplosion: ScriptName DLC04:DLC04ExplosionOnEffect extends activemagiceffect ;-- Properties --------------------------------------Explosion Property myExplosion Auto Constint Property myCount = 1 Auto Constfloat Property myXOffset = 0 Auto Constfloat Property myYOffset = 0 Auto Constfloat Property myZOffset = 0 Auto ConstForm Property xMarker Auto Const ;-- Variables --------------------------------------- ;-- Functions --------------------------------------- Event OnEffectStart(Actor akTarget, Actor akCaster)ObjectReference myTarget = akTarget.placeAtMe(xMarker, 1, False, False, True)myTarget.MoveTo(akTarget as ObjectReference, myXOffset, myYOffset, myZOffset, True)myTarget.placeAtMe(myExplosion as Form, myCount, False, False, True)myTarget.Delete()EndEvent I tried it with contact and target actor, it does not work as well. . . My main objective is to be able to spawn an explosion via script (not the projectile explosion) when I hit my target so that I can add a percentage chance to proc that additional explosion from the attached script. Link to comment Share on other sites More sharing options...
hereami Posted October 29, 2019 Share Posted October 29, 2019 Any script, regardless of its name, may be reused by any object, if does fit the goal and object type.Well, idk then. Usual troubleshooting - make sure player has perk (if so) and the spell hits a target, e.g. specify any visible hit shader. Link to comment Share on other sites More sharing options...
Recommended Posts