Jump to content
Heavy Traffic ×

dylbill

Premium Member
  • Posts

    1399
  • Joined

  • Last visited

Nexus Mods Profile

About dylbill

Profile Fields

  • Country
    United States

Recent Profile Visitors

40828 profile views

dylbill's Achievements

Mentor

Mentor (12/14)

  • Dedicated Rare
  • Conversation Starter
  • First Post
  • Collaborator Rare
  • Posting Machine Rare

Recent Badges

5

Reputation

  1. Is this what you're looking for? https://www.nexusmods.com/skyrimspecialedition/mods/13363
  2. When you get the unkown type error, it means the compiler can't find that script in the source folder. Make sure the dialoguefollowerscript.psc file is in the correct source folder. By default for LE it's Data/Scripts/Source By default for SE it's Data/Source/Scripts Also if you're new to scripting you may not have unzipped the Scripts.Zip file yet which can be found in the Data folder.
  3. Actually now that I think about it, using animation variable would be easier. You'd have to determine somehow which hand the spell is equipped in when cast, and also save the target actor onEffectStart. Then you can do for instance: while Target.GetAnimationVariableBool("IsCastingRight") https://ck.uesp.net/wiki/List_of_Animation_Variables
  4. From what I understand, scripting in oblivion vs scripting in skyrim is pretty different. I'd recommend reading through this section of the papyrus wiki: https://ck.uesp.net/wiki/Differences_from_Previous_Scripting For what you want to do, you'd attach a script to the magic effect used in your drug (potion) with an OnEffectStart and OnEffectFinish event to handle the addiction. A very simple example would be something like this: Scriptname DrugAddictionScript extends ActiveMagicEffect Spell Property AddictionSpell Auto Event OnEffectStart(Actor akTarget, Actor akCaster) If akTarget.HasSpell(AddictionSpell) akTarget.RemoveSpell(AddictionSpell) Endif EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) akTarget.AddSpell(AddictionSpell) EndEvent Also here's a good video series on scripting for skyrim if interested.
  5. My first thought would be to use animation events to detect when stopping casting. https://ck.uesp.net/wiki/Animation_Events
  6. To your second question, SendModEvent is different than ModEvent.Send. SendModEvent has pre defined parameters. if you look in Form.psc it's this: ; Sends custom event with given generic parameters. Function SendModEvent(string eventName, string strArg = "", float numArg = 0.0) native ModEvent.Send is for custom parameter types and amounts. You can have custom amounts of bool, int, float, string or form params, but make sure that the params in your event line up in the order that you push them to your handle. To make things easy, you could write a wrapper global function that you can use from any other script. Example: Scriptname MyCustomEvents Hidden Function SendMyCustomEvent(Form SomeForm, Int SomeInt) Global int handle = ModEvent.Create("MyModPrefix_MyCustomEvent") if (handle) ModEvent.PushForm(handle, SomeForm) ModEvent.PushInt(handle, SomeInt) ModEvent.Send(handle) endIf EndFunction then in another script: Event OnInit() RegisterForModEvent("MyModPrefix_MyCustomEvent", "OnMyCustomEvent") Actor playerRef = Game.GetPlayer() MyCustomEvents.SendMyCustomEvent(playerRef, playerRef.GetLevel()) EndEvent event OnMyCustomEvent(Form SomeForm, Int SomeInt) Debug.MessageBox(SomeForm + " " + SomeInt) EndEvent
  7. Yeah that is annoying. You can rename an alias after the fact though.
  8. If the alias's aren't already made, I'm pretty sure you can attach the script to one alias, fill the properties, then duplicate the alias 40 times or whatever. The script should be attached to the duplicate alias's with properties filled.
  9. If you want to look at the script with notepad you need to open the source .psc files, not the .pex files. To view in the creation kit, copy the source .psc files from Data/Scripts/Source to Data/Source/Scripts. In Skyrim LE they were in Data/Scripts/Source but they switched it to Data/Source/Scripts in Skyrim SE
  10. I made a mod that does something similar called Charge or Fill - Spells: https://www.nexusmods.com/skyrimspecialedition/mods/18090 Source code is included if you want to take a look.
  11. Here's a script that will do this: Scriptname SlowPosionEffectScript extends ActiveMagicEffect {Damage the target's' sActorValue by DamageAmount every UpdateInterval while this effect is active} String Property sActorValue Auto Float Property DamageAmount Auto Float Property UpdateInterval Auto Actor Target Event OnEffectStart(Actor akTarget, Actor akCaster) Target = akTarget ;save target actor so it can be used in other events in this script Target.DamageActorValue(sActorValue, DamageAmount) RegisterForSingleUpdate(UpdateInterval) EndEvent Event OnUpdate() Target.DamageActorValue(sActorValue, DamageAmount) RegisterForSingleUpdate(UpdateInterval) ;Update is automatically unregistered when the effect ends. EndEvent Compile the script, attach it to a magic effect then set the properties in the properties tab in the creation kit. Example, if you set sActorValue to "Health", DamageAmount to 2.0 and UpdateInterval to 1.0 it will damage the target's health by 2.0 every second while the effect is active.
  12. This is a syntax error. I'm actually surprised it compilied. You're using IsEnabled not on object1 or object2, so it checks if the PuzzlePullBar is Enabled. it should be: If (Object1.IsEnabled() && Object2.IsEnabled())
  13. To get base form type you'll want to use GetBaseObject()
  14. You could also try using a paralyze magic effect, or Papyrus Extender has a FreezeActor function. https://www.nexusmods.com/skyrimspecialedition/mods/22854
×
×
  • Create New...