Jump to content

dylbill

Premium Member
  • Posts

    1493
  • Joined

  • Last visited

Everything posted by dylbill

  1. Yep, also remember to update the actor after changing speed. You can by adding and removing an item from their inventory.
  2. You can use a script to set speedmult actor value to 0.1 which will prevent moving, but they'll still be able to attack.
  3. Skyrim's way of doing it is version control. Basically you have a master esm file that esp's are merged to periodically. Here's a tutorial on version control:
  4. I tested this out actually, and it doesn't conflict. I used this method in a recent mod of mine to detect when the player opens a container. I made another esp with another perk that had basically the same entry and put debug notifications in both fragments. With both esps active, I got notifications from both perk entries when activating a container.
  5. Hello, thought I'd give my take. As an alternative, you can use a perk with a perk fragment script. Add it to the player With PlayerRef.AddPerk(MyPerk). In your perk, make a new perk entry. Set it to Entry Point, Activate, Add Activate Choice and check the Run Immedately box. Add a keyword to Target, HasKeyword CraftingSmithingForge == 1 Then, in your perk fragment you can do: Debug.Notification(akTargetRef.GetDisplayName() + " Was Activated") The perk entry will run whenever the player activates an object reference with the CraftingSmithingForge keyword.
  6. To add perks, you have to do so in the actual Actor record, not the race record. It's under SpellList.
  7. I would change the functions that are events to events. All events that I know of start with On. Example: Change Functon OnInit() ;code here stays the same EndFunction To Event OnOnit() ;code here stays the same EndEvent
  8. For the floats, you have to put a period to initialize. So change to 1.0 and 64.0 Edit: and this is because 1 or 64 is viewed by papyrus as an int, so you're trying to initialize float properties to ints and papyrus doesn't like that.
  9. To be able to craft anything, you need to create a new Constructible Object form in the Creation Kit. Not sure about the depleting part.
  10. @Maxaturo, I was thinking to set stagger for all weapons onInit or on load game if the changes don't persist based on settings and conditions. I do something similar with my mod Customize Weapon Speed.
  11. Cool cool. Another thing to consider, weapons have their own stagger attribute. With script there is getStagger and setStagger functions (require skse) to affect weapons directly. https://www.creationkit.com/index.php?title=GetStagger_-_Weapon https://www.creationkit.com/index.php?title=SetStagger_-_Weapon
  12. So you want an effect to apply when the actor attacks with any weapon in the right hand? If so, then yes you will need a script. You can use animation events. You can make an ability spell and put a script on the magic effect, something like this: Actor Target Event OnEffectStart(Actor akTarget, Actor akCaster) Target = akTarget If Target.GetEquippedWeapon() RegisterForAnimationEvent(Target, "weaponSwing") ;weaponSwing fires when attacking with right hand. weaponLeftSwing for left. Endif EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If Target.GetEquippedWeapon() ;target has weapon in right hand RegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If !Target.GetEquippedWeapon() ;target does not have weapon in right hand UnRegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnAnimationEvent(ObjectReference akSource, String asEventName) ;do something EndEventHere's a list of animation events for reference. https://www.creationkit.com/index.php?title=Animation_Events
  13. If you want an effect to apply when only attacking with a weapon, I suggest to use an enchantment on the weapon itself
  14. You can use the GetEquipped condition. According to the Wiki, this condition only works for armor or weapons in the right hand. https://www.creationkit.com/index.php?title=GetEquipped
  15. Hey I just took another look, the indents were confusing me. The script as you have it, indented correctly should look like this: Actor Property PlayerRef Auto GlobalVariable Property _RightWeaponMass Auto Float RightWeaponMass = 0.00 Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.Wait(0.5) Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight Else RightWeaponMass = 0 _RightWeaponMass.SetValue((RightWeaponMass) * 1) EndIf EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.Wait(0.5) Debug.Notification("This actor just equipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() As Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight Else RightWeaponMass = 0 _RightWeaponMass.SetValue((RightWeaponMass) * 1) EndIf EndEventAnd you can see, you're only setting the global variable value if the equipped item is not a weapon. Change to something like this: Actor Property PlayerRef Auto GlobalVariable Property _RightWeaponMass Auto Float RightWeaponMass = 0.00 Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.waitMenuMode(0.5) ;use waitMenuMode instead. Wait will pause this script until a menu is closed. Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight _RightWeaponMass.SetValue(RightWeaponMass) Debug.Notification("_RightWeaponMass = " + _RightWeaponMass.GetValue()) EndIf EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.waitMenuMode(0.5) ;use waitMenuMode instead. Wait will pause this script until a menu is closed. Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight _RightWeaponMass.SetValue(RightWeaponMass) Debug.Notification("_RightWeaponMass = " + _RightWeaponMass.GetValue()) EndIf EndEvent Also, is there a reason you're storing the weapon weight to the local float variable RightWeaponMass and to the global variable?
  16. The script looks fine. Did you fill properties when attaching the script in the creation kit? You can also put some debug notifications to tell you the weight. Debug.Notification("RightWeaponMass = " + RightWeaponMass + " Global Value = " + _RightWeaponMass.GetValue())
  17. Hey Maxaturo, with the script I posted, whenever you press a button, it calls the SetBanners function on the main script, so should work as is without needing timers.
  18. Ok I think I understand now. I agree with Maxaturo, you should have a main controller script that sets the banners, and a button script on an activator. Something like this. The script on your button activators: Scriptname TM_ButtonScript extends ObjectReference Bool Property IsPressed Auto Hidden TM_MainScript Property MainScript Auto ;your main contoller script Event OnActivate(ObjectReference akActionRef) IsPressed = !IsPressed ;toggle IsPressed ;also do something else here to show that the button is pressed or not visually MainScript.SetBanners() EndEventThen your main script: Scriptname TM_MainScript extends Quest ;In the CK, fill these properties with your button activators that have the TM_ButtonScript attached. TM_ButtonScript Property Button1 Auto TM_ButtonScript Property Button2 Auto TM_ButtonScript Property Button3 Auto ObjectReference Property Banner0 Auto ObjectReference Property Banner1 Auto ObjectReference Property Banner2 Auto ObjectReference Property Banner3 Auto ObjectReference Property Banner4 Auto ObjectReference Property Banner5 Auto ObjectReference Property Banner6 Auto ObjectReference Property Banner7 Auto Function DisableAllBanners() Banner0.Disable() Banner1.Disable() Banner2.Disable() Banner3.Disable() Banner4.Disable() Banner5.Disable() Banner6.Disable() Banner7.Disable() EndFunction Function SetBanners() DisableAllBanners() ;disable all banners first If Button1.IsPressed && Button2.IsPressed && Button3.IsPressed Banner0.Enable() Elseif Button1.IsPressed && Button2.IsPressed Banner1.Enable() Elseif Button1.IsPressed && Button3.IsPressed Banner2.Enable() ;ect.... Endif EndFunction
  19. If I understand correctly, you want one button to choose a banner to display? This is how I would do it: Int iBannerSelected = 0 ;this is an array of you banners. Add banner ObjectReference's to it in the creation kit by clicking the properties tab for this script. ObjectReference[] Property Banners Auto Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ;did the player activate this? int i = 0 int L = Banners.length While i < L ;first, disable all banners Banners[i].disable() i += 1 EndWhile iBannerSelected += 1 ;add 1 to iBannerSelected If iBannerSelected >= L ;if iBannerSelected is greater than the max index of Banners array, set back to 0 iBannerSelected = 0 Endif Banners[iBannerSelected].enable() ;enable next banner in the array list. Endif EndEvent
  20. To have the effect last forever, I think you can just uncheck the Recover flag in the magic effect.
  21. In Skyrim the ActionLand JumpSoftEnd animation has the condition GetGraphVariableFloat VelocityZ >= 0. I assume there's something similar for fallout 4. Look in GamePlay / Animations in the CreationKit, then look for Character animations and see what conditions they use there for jump and land.
  22. I didn't find one, so I made it. You can find it here: https://www.nexusmods.com/skyrimspecialedition/mods/71280 I also want this functionality in my game if I ever get around to starting a new playthrough lol.
  23. Awesome, glad it's working :), there must be an effect shader or something else happening with the vanilla script. And again no problem, happy modding!
  24. No problem, happy to help :) hope you get it working to your liking.
×
×
  • Create New...