Jump to content

dylbill

Premium Member
  • Posts

    1493
  • Joined

  • Last visited

Everything posted by dylbill

  1. I think you can do: if Weather.FindWeather(3) Endif It will find a snowy weather in the current region if it exists.
  2. You can use my mod Dylbills Papyrus Functions which includes DbSkseEvents. https://www.nexusmods.com/skyrimspecialedition/mods/65410 Example, assuming your script is attached to a form. Event OnInit() DbSkseEvents.RegisterFormForGlobalEvent("OnItemCraftedGlobal", self) EndEvent ;must re register on load game Event OnLoadGameGlobal() DbSkseEvents.RegisterFormForGlobalEvent("OnItemCraftedGlobal", self) EndEvent Event OnItemCraftedGlobal(Form itemCrafted, ObjectReference benchRef, int count, int workBenchType, string benchSkill) if benchSkill == "enchanting" Debug.MessageBox(itemCrafted.GetName() + " enchanted") Endif EndEvent
  3. Put in debug.messagebox or notification to see when the script is firing. You also have it set so it only works if getting hit by the player.
  4. Short answer, yes, this is possible. I'd need more specifics though to be able to give better advice though. One trick I like to do with magic effects is to put two scripts on the magic effect. One that extends ActiveMagicEffect and one that extends MagicEffect. ActiveMagicEffect is a new script object that is created every time the effect starts while the MagicEffect is seperate and sits on the base object. It's similar to say having 2 scripts on a misc object. One that extends MiscObject and one that extends ObjectReference. Example, 2 scripts attached to the magic effect form in the creation kit. First script: scriptname TM_MagicEffectScript extends MagicEffect Function SomeFunction() EndFunction Second script: Scriptname TM_ActiveMagicEffectScript extends ActiveMagicEffect Event OnEffectStart(Actor akTarget, Actor akCaster) ;get the TM_MagicEffectScript attached to this activeMagicEffect's baseObject (which is a magicEffect form) TM_MagicEffectScript scriptRef = GetBaseObject() as TM_MagicEffectScript ;if the TM_MagicEffectScript ref was found if scriptRef scriptRef.SomeFunction() Endif EndEvent
  5. Probably ActionScript 2.0 as that's what Skyrim uses natively. If you have Adobe Flash cs4 or cs6 I would use that. Otherwise you could theoretically do it with an skse plugin. The wheeler mod does this and source is provided on github. https://www.nexusmods.com/skyrimspecialedition/mods/97345
  6. Have you tried using PlayIdleWithTarget ? Also some idles will only play if the actor is already using a certain idle. Try to have the actor activate the CounterBarLeanMarker furniture reference first and see if that works.
  7. in papyrus there is the KeepOffsetFromActor and ClearKeepOffsetFromActor functions. https://ck.uesp.net/wiki/KeepOffsetFromActor_-_Actor You could also make a mount out of an npc. Here's a tutorial on how https://www.nexusmods.com/skyrim/mods/13865
  8. Audio can be baked in to animations. You probably want to do that with paired animations.
  9. No problem. If you’re using skse, my mod Dylbills Papyrus Functions has an IsActorPowerAttacking function. I haven’t tested the iState_NPCAttacking2H animation variable though.
  10. You might have to use a script. GetAnimationVariableBool with these two variables: "iState_NPCPowerAttacking" "iState_NPCAttacking2H" I don't see a CK condition for GetAnimationVariableBool
  11. You could use a combination of GetLineOfSight and GetDistance conditions. Btw here is a list of CK conditions. https://ck.uesp.net/wiki/Condition_Functions
  12. Just play a new FxShader in the OnEffectFinish event, one that isn't looped, or if it is looped, fxEndShader.play(akcaster) Utility.wait(1) fxEndShader.stop(akcaster)
  13. There's the GetInFaction condition. Choose run on Reference, then select the actor reference. (you must know the cell they are in).
  14. No problem be sure to change the name of MyQuestScript to something more unique
  15. You can't add your own functions to fragments because fragments are already their own function and you can't add functions inside of other functions in papyrus. A common thing for fragments though is to call your code somewhere else. For example, add a script to the quest that the fragment is on. Scriptname MyQuestScript Extends Quest Function SameAmount() EndFunction Then in your fragment you can do: (GetOwningQuest() as MyQuestScript).SameAmount()
  16. I agree the while loop looks suspicious. When do DaughtersCount2 or SonsCount change? Because if those stay the same for a long time that while loop will continue to run. Probably better to use a RegisterForSingleUpdate loop if you're using it for polling instead of the while loop. For things like this I prefer to use arrays. As an example I'll use the first condition set. You can definitely use *10 for that but it's just good for example purposes. GlobalVariable Property DaughtersVariableProperty Auto Quest Property OnlyDaughtersQuestProperty Auto int[] Property DaughtersCount2Stages Auto Event OnInit() CreateArrays() EndEvent Function CreateArrays() ;you can also set this array in the creation kit directly DaughtersCount2Stages = new int[7] DaughtersCount2Stages[0] = 0 ;unused DaughtersCount2Stages[1] = 10 DaughtersCount2Stages[2] = 20 DaughtersCount2Stages[3] = 30 DaughtersCount2Stages[4] = 40 DaughtersCount2Stages[5] = 50 DaughtersCount2Stages[6] = 60 EndFunction ;Edit: I guess you should check if DaughtersCount2 is in range first if you know it can be out of range. Function SetOnlyDaughtersQuestStage() int DaughtersCount2 = DaughtersVariableProperty.GetValueInt() if DaughtersCount2 >= 1 && DaughtersCount2 <= 6 OnlyDaughtersQuestProperty.SetStage(DaughtersCount2Stages[DaughtersCount2]) Endif EndFunction
  17. Lol, no problem, it happens to all of us at some point. Happy modding!
  18. In c++ you'll want to use something like this: float GetProjectileData(RE::StaticFunctionTag*, RE::BGSProjectile* projectile) { } For binding the function to papyrus check out this video:
  19. I'm not sure exactly what you're trying to do, can you elaborate? A good place to ask SKSE related stuff is MrowrPurr's discord: https://discord.com/channels/874895328938172446/945560222670393406 Also sometimes searching on Github can help
  20. I think Papyrus Extender has what you need: https://www.nexusmods.com/skyrimspecialedition/mods/22854 There's these functions LightingTemplate Function GetLightingTemplate(Cell akCell) global native Function SetLightingTemplate(Cell akCell, LightingTemplate akLightingTemplate) global native
  21. This will require skse. There’s SetNthEntryValue and GetNthEntryValue script functions with skse. https://ck.uesp.net/wiki/SetNthEntryValue_-_Perk
×
×
  • Create New...