Scriptname RBTZ_JetpackFXOnJumpControl extends activemagiceffect
ObjectReference selfRef
VisualEffect Property VisualEffect1 Auto
VisualEffect Property VisualEffect2 Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
selfRef = akCaster
RegisterForControl("Jump")
EndEvent
Event OnControlDown(string control)
If (control == "Jump") && !Utility.IsInMenuMode()
VisualEffect1.Play(selfRef)
VisualEffect2.Play(selfRef)
EndIf
EndEvent
Event OnControlUp(string control, float time)
If (control == "Jump") && !Utility.IsInMenuMode()
VisualEffect1.Stop(selfRef)
VisualEffect2.Stop(selfRef)
EndIf
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
UnregisterForControl("Jump")
VisualEffect1.Stop(selfRef)
VisualEffect2.Stop(selfRef)
EndEvent
Another script as alternative to the first one. With this one, the visual effects play only while the jump button is pressed. The detection is pretty accurate. However, the RegisterForControl function comes from the Fallout 4 Script Extender. It is required that you have F4SE installed and run the game through its loader. Again the script is meant to be attached to a Constant Effect/Self Magic Effect. If you have different visual effects for male and female, you'll need two Magic Effects. After adding them to the Object Effect/Enchantment, also add condition checks for each Magic Effect:
- Subject.GetIsSex(Male) = 1.000000 AND
- Subject.GetIsSex(Female) = 1.000000 AND

0 comments