How to create new script?

Post » Thu Nov 14, 2013 10:14 pm

I need to create a new script for a mod I'm making that makes skooma addictive. I've heard that you're not supposed to attach the script directly to the potion in question and you have to directly add a script in. Can anyone tell me how? Is it even possible to do it directly through CK, or do I have to download a certain program or something?

User avatar
Jennie Skeletons
 
Posts: 3452
Joined: Wed Jun 21, 2006 8:21 am

Post » Fri Nov 15, 2013 9:56 am

Potions are a little bit different for attaching scripts than other objects. You'll see in the Potion Window that there are Magic Effects. For you Skooma, you'll need to create a new Magic Effect to attach the script to.

So for the magic effect, you'll at least need these things:

  • Effect Archetype: Script
  • Casting Type: Fire and Forget
  • Delivery: Self

Then you attach your script to the magic effect. Your script will then look something like:

Scriptname _test_testscript extends ActiveMagicEffectEvent OnEffectStart(Actor akTarget, Actor akCaster)    ;do stuff!endEvent
User avatar
Amy Cooper
 
Posts: 3400
Joined: Thu Feb 01, 2007 2:38 am

Post » Fri Nov 15, 2013 1:19 pm

Thanks, this should help a lot!

User avatar
Lory Da Costa
 
Posts: 3463
Joined: Fri Dec 15, 2006 12:30 pm


Return to V - Skyrim