Help with Movable Static Lightning

Post » Wed Jun 20, 2012 1:53 am

I have searched for hrs, and cannot find a solution. Be that in the CK or on the web.

I am trying to create a cage with a constant Lightning effect. The only Movable Static Lightning is called "TestLightningGeo". Not really what I want, but I could make it work. The prob is that it doesn't animate.

I would like to have something like the spell animation that is constant.

I am still very new to all this. So I really don't know what I'm doing/ I have been watching the videos, but haven't seen anything on this. I watched a couple on "Lighting" but not any info on "Lightning".
User avatar
abi
 
Posts: 3405
Joined: Sat Nov 11, 2006 7:17 am

Post » Wed Jun 20, 2012 12:04 pm

You could make a set of paired objects, and make the first of each pair cast the actual lightning spell at the other one.

Or sparks, since that's a constant effect.
User avatar
Ria dell
 
Posts: 3430
Joined: Sun Jun 25, 2006 4:03 pm

Post » Wed Jun 20, 2012 7:48 am

Just made my first parent/child activation with a gate. I'm trying to get a drawbridge to work, but having issues. I assume the objects activate the same way? I need to research that application. That sounds like it would be an option.

Other than that, I would just select Sparks from the Magic menu? Yes?
User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am

Post » Wed Jun 20, 2012 9:08 am

No "Sparks" option. After I get the drawbridge thing figured out, I will try the opposing object thing...
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Wed Jun 20, 2012 2:42 am

No "Sparks" option. After I get the drawbridge thing figured out, I will try the opposing object thing...

To save some time, you can probably just use TrapFlamethrower, which can just cast spells straight ahead (or at a linked Ref). Its Script properties can be edited to cast Sparks (or chain lightning or lightning bolt), so then all you would need is any sort of trap trigger with the "Turn On" property (Type = 3).
User avatar
Cccurly
 
Posts: 3381
Joined: Mon Apr 09, 2007 8:18 pm

Post » Wed Jun 20, 2012 3:11 pm

Thanks for the help folks. Time for trap learning mode. I need to watch that tutorial anyway.
User avatar
brian adkins
 
Posts: 3452
Joined: Mon Oct 01, 2007 8:51 am

Post » Wed Jun 20, 2012 2:29 pm

Here's a working version: Create two activator types, ShockGenerator and ShockTarget. Give the ShockGenerator a visible model so you can see it in the editor to position it, and put the following script on it:

Scriptname LightningSpoke extends ObjectReference  import UtilityFloat Property xOffset  Auto  {Relative X position for the target}Float Property yOffset  Auto  {Y Offset for Target}Float Property zOffset  Auto  {Z offset for Target}Float Property RandomOffsetX = 0.0 Auto{Randomness applied to X Offset}Float Property RandomOffsetY = 0.0 Auto{Randomness applied to X Offset}Float Property RandomOffsetZ = 0.0 Auto{Randomness applied to X Offset}Float Property PulseRate = 1.0 Auto  {How often do we shoot the other node?}Float Property RandomRate = 0.0 Auto{Add random delay to pulse rate, capped at this value}Activator Property TargetType  Auto  {What type of object are we zapping if we're spawning a node?}ObjectReference Property CurrentTarget  Auto  {The actual target we're shooting at}Bool Property SpawnNode  Auto  {Do we spawn a target? If not, zap the nearest Actor.}Spell Property Zap Auto{What spell shall we use for the effect?}FormList Property TargetTypeList Auto{List of potential targets}Event OnInit()    if SpawnNode && !CurrentTarget        CurrentTarget = PlaceAtme(TargetType,1)        CurrentTarget.MoveTo(Self,XOffSet,YOffSet,ZOffSet)    endif    RegisterForSingleUpdate(PulseRate)EndEventEvent OnUpdate()    if !SpawnNode        CurrentTarget = Game.FindClosestReferenceOfAnyTypeInListfromRef(TargetTypeList,Self,1000.0) ; find an actor to shoot at    else        CurrentTarget.MoveTo(Self, XOffSet+(RandomFloat(0.0,RandomOffsetX)-RandomOffsetX/2 ), \            YOffSet+(RandomFloat(0.0,RandomOffsetY)-RandomOffsetY/2), \            ZOffSet+(RandomFloat(0.0,RandomOffsetZ)-RandomOffsetZ/2))    endif    Zap.Cast(Self,CurrentTarget)    RegisterForSingleUpdate(PulseRate+RandomFloat(0.0,RandomRate))EndEvent

Set the Spell property Zap to what spell you want to use, set the spawn boolean to "True", and pick X, Y, and Z offsets to set what direction and distance you want to zap, and a frequency to determine how often it shoots. As a bonus, if yuu move the activator in game, the target will move to the same relative position...this would allow you to make "Curtains" of electricity you can move to the side to allow the player through, then close behind him.
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Wed Jun 20, 2012 11:59 am

Good Lord...I have no idea what that post says. Float property? Boolean?....SpawnNode?
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Wed Jun 20, 2012 2:19 pm

Good Lord...I have no idea what that post says. Float property? Boolean?....SpawnNode?

Don't panic...it's a script...you'll get used to them.

It's written in computerese. I'll explain it a bit at a time:

The first line starts with "ScriptName" - this means that it's definining a script named "LightningSpoke" that does everything an ObjectReference script can do.

Next, I define some Properties of various types..these allow you to set a bunch of options from outside the script (in the object itself's Script area) to determine how it behaves.

The First three are of type "Float" which is shorthand for "Floating Point Number" (A number that can have a decimal point in it) which will determine how far from the object the Node we'll be spawning will be on the X, Y, and Z axes.

The fourth Float property is the number of seconds the object will wait between "Zaps"

Next we have an Activator property "TargetType" which we will assign to the second object type we create (I like activators, because you can assign the types without picking from a render window)

The next property is an ObjectReference called "CurrentTarget" which will be assigned to whatever we're zapping.

The next property is of Boolean type (bool for short) which simply means that it is either "True" or "False" - I added this because you may want to have a lightning zapper that will zap the player, or some other thing nearby instead of making an invisible target. For now, just set this to "True" in the properties window for the script.

Next we have a "Spell" property called "Zap" which will be assigned to the spell "Sparks" in the properties window for the script. You can pick any spell you want to change what spell the emitter shoots.

Finally, there is a FormList property called 'TargetTypeList' which can be built in the Creation Kit to make a list of potential targets (Actors, etc) that the node will look for to zap if it's not using a spawned node.


That's all for the properties. Next we have two events the script will respond to.

Event OnInit: when the emitter is loaded, it will check to see if it's supposed to spawn an invisible target. If it is, it does so. Then it RegistersForUpdate using the assigned PulseRate defined up above.

Event OnUpdate: This is called evry "PulseRate" seconds, since the OnInit event told it to.

The first thing OnUpdate does is check to see if it's supposed to shoot at a predefined target. If it's not, it looks around for a target from the Formlist property. If it is, it moves the target to the correct position (in case the zapper object has been moved)

Then it shoots the spell at the target. It does this repeatedly, so long as it still exists.
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm

Post » Wed Jun 20, 2012 9:51 am

The nice thing about the script is, you can move the emitter, and the target will move with it...and you can move the target by setting the XOffset,YOffSet, and ZOffSet properties from another script.
User avatar
Alyesha Neufeld
 
Posts: 3421
Joined: Fri Jan 19, 2007 10:45 am

Post » Wed Jun 20, 2012 11:06 am

I really appreciate all the help RE. I am determined to do this. I just started playing around with the CK and was making the exterior of my player house/turned castle. I haven't even started on an interior cell fore it yet. Some are just as simple as a Trap door in the ground, while others are elaborate Mansions that blanket the landscape. mine has turned into the later. I love this stuff. Now that I'm on the PC, I don't think I will have a problem decorating my house anymore...or will I?

It seems that I am just going to have to forego this Script writing a little ahead of time.

Thanks again. I hope to have a lightning cage by bedtime...next year. :biggrin:

EDIT : As far as having a trigger for the player/NPC, I just want a constant effect for decor.

EDIT 2 : I appreciate the explanation of the terms. I understand what those things are supposed to do...somewhat. The thing is, i have no idea where to change them. I have the Nord Flamethrower, in the window. It is a small device and it will work fine. But when I bring up the reference by "double clicking" on it...I am lost. I see the script tab, but have no idea what to do at that point.
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Wed Jun 20, 2012 7:56 am

Just create the two activator types I mentioned, edit the Generator one, click "add" in the script area, choose "New script", call it "LightningSpoke", and paste all that stuff I put in there (right click and pick "edit source) and save.
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Wed Jun 20, 2012 12:29 am

Then, give the generator object a model so you can see it and move it around in the editor. The generator creates it's own target, so you just need to tell it where to put it.

To do that, click the "Properties" button on the script and edit the values til it looks http://i591.photobucket.com/albums/ss358/RedwoodElf/ShockGenerator.jpg
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am

Post » Wed Jun 20, 2012 5:31 am

Just create the two activator types I mentioned, edit the Generator one, click "add" in the script area, choose "New script", call it "LightningSpoke", and paste all that stuff I put in there (right click and pick "edit source) and save.
Then, give the generator object a model so you can see it and move it around in the editor. The generator creates it's own target, so you just need to tell it where to put it.

To do that, click the "Properties" button on the script and edit the values til it looks http://i591.photobucket.com/albums/ss358/RedwoodElf/ShockGenerator.jpg
Do I paste all of that or just the parts in blue? Omit the parts in {bla bla}?

Where are you getting the "Generator" and "Target" from? Are you calling the Nord Flamethrower the generator and just renamed it? If the generator creates it's own target, why do you need to have a model? When you say that..."Create a model for it." You mean ANY static object, that doesn't have physics? Like a chair?

So in the end you have a "Generator" ie, Nord Flamethrower and a "Target" ie, chair? You just change the script in the reference window?

Bare in mind, I'm and old dog, trying to learn a new trick.

EDIT : I finally got the first part. I made two NordFlamethrowers into a Generator and Target. Like your link. I had to click on "Edit Base" and change the ID.

Baby steps, my friend...baby steps.
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Tue Jun 19, 2012 10:36 pm

I give up.....

I just don't understand what to type where. I 'm getting lost in translation. Unless I have an exact step by step to follow, from loading the CK...it's a lost cause.

Thanks for the help anyway....
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Wed Jun 20, 2012 12:54 pm

I'm not using any particular object as a base, I wsa creating them from scratch.

To create the invisible target, go to "Activators" under World Data, right click and pick "New" - Name your new form "ShockTarget" - it doesn't need anything else, it's just an invisible thing the lightning generator creates and moves around.

If you want something easy to move around for your generator, you can use any object in the game as an emitter. For example, type "IronDagger" in the filter on the object window, scroll down to the plain iron dagger, and type a new name "LightningDagger" where "IronDagger" was - when it asks you if you want to create a new form, say "Yes"

Then Change IronDagger to LightningDagger in the filter, then double click on the new LightningDagger, Click "Add" in the scripts area, pick "[New Script]" out of the list and click "OK" - Name the script "LightningSpoke" and click "OK" - You will see a big blue + sign with "LightningSpoke" after it appear in the scripts area. Right click and pick "Edit Source" - you will notice that the top line of the source looks very familiar...

Paste in everything else in the above post, down to the last "EndEvent" line. Then pick "File - Save. It will think for a bit and say something like "Compilation Succeeded" - Close the script source and click "Properties" - edit each property that dosn't say "Default" in my earlier screenshot - The float values can be whatever you like to set the timing, direction, and so on.

The really important property is the TargetType one..it tells the script what to use as a target...just pick "ShockTarget" out of the list (It's he one you created earlier) - then just pick a spell to use, and put one in your house so you can see how it works.
User avatar
Marlo Stanfield
 
Posts: 3432
Joined: Wed May 16, 2007 11:00 pm

Post » Wed Jun 20, 2012 10:06 am

I'm getting closer! You're the champ. Even if I still screw this up...
User avatar
matt oneil
 
Posts: 3383
Joined: Tue Oct 09, 2007 12:54 am

Post » Wed Jun 20, 2012 8:38 am

Well, butter my butt and call me a biscuit! I finally got it! I am going have a lot of fun with that Script! I already see MANY different customizations for that thing.

Thank you sooo much. My Vampire estate, called Castelo Vivaldi, is going to be the shock of the century.

If there was any way I could return the favor, I certainly do it my friend. You made a dumb old man very happy. :banana:
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Tue Jun 19, 2012 11:16 pm

Once the script is written, you can attach it to any object in the game to make it a spell spamming thing.
User avatar
Alex Vincent
 
Posts: 3514
Joined: Thu Jun 28, 2007 9:31 pm

Post » Wed Jun 20, 2012 6:48 am

Yes, I see. As you said earlier, being able to change the variables and spells is a plus.

Funny. This morning I was just set out on getting a functional drawbridge. Now look what we have to work with. I am having more fun just making this stuff than I did actually playing the game. Thanks again.
User avatar
celebrity
 
Posts: 3522
Joined: Mon Jul 02, 2007 12:53 pm

Post » Wed Jun 20, 2012 1:16 am

Yes, I see. As you said earlier, being able to change the variables and spells is a plus.

Funny. This morning I was just set out on getting a functional drawbridge. Now look what we have to work with. I am having more fun just making this stuff than I did actually playing the game. Thanks again.

Welcome to the Modder Madness...it's fun here.

Drawbridges are a pain...I've only been able to get them to work if they are facing DIRECTLY North, south, east, or west. The funky rotations the game uses prevent being able to rotate them realistically at any other angle.
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Wed Jun 20, 2012 9:14 am

I got a bridge to work. The only "drawbridge", labeled as such in Activations had no script. I checked the one for my gate and tried to use it. The script was labeled as "2stage something-something", still no go. I found several drawbridges listed under "Retractable". They work fine, with the button. They were all scripted with the 2stage script.

So we're back in business!

All of my Vampire chars are Imperials. So I'm trying to stick with just the Imperial kit, as much as possible. Sadly none of the retractable bridges are Imperial influenced. The wooden Nord bridge will be good enough.

The several towers that are erected are capped with an overscaled cadge. Those lightning effects are epic inside those things.

Here is a few shots.

http://cloud.steampowered.com/ugc/488878795947996550/658CAF40C62286456E4F483ABE6A6338A88E9240/

http://cloud.steampowered.com/ugc/488878795947988636/5B3B2D3210BA1F171EA42C5E75341CD496558555/

http://cloud.steampowered.com/ugc/488878795947994426/677679D183A695692F57D2F47EA55BFB6F16C52B/

http://cloud.steampowered.com/ugc/488878795947992731/7120B7C90B81232BC6D955417DCD22F04BFDCD00/

http://cloud.steampowered.com/ugc/488878795947990394/2E9FF46C165C3E9360C1D6D3F96F8186B4670607/

http://cloud.steampowered.com/ugc/488878795947991814/93157B643F941D8CFB41EC4010AC102D30B1C4D6/

http://cloud.steampowered.com/ugc/488878795947996056/16660A433DA5C12C66DE369E9460A8337C2B0C7E/
User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm

Post » Wed Jun 20, 2012 7:01 am

Hmn...Wouldn't think that Dibella would be the one they'd choose as vampires though...Clavicus Vile maybe...he's associated with Vampires in the Skyrim Storyline....
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Wed Jun 20, 2012 1:37 pm

Hmn...Wouldn't think that Dibella would be the one they'd choose as vampires though...Clavicus Vile maybe...he's associated with Vampires in the Skyrim Storyline....
Ha! Yes you are right. She is only there, for now, because she had snow on her. Still, a lot will change on it before it's over I'm sure. The main thing is that I got my feet wet in scripting. And thanks to you I have a very handy script to use with all kinds of stuff. Be that a flaming cowl or more shock cages.
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am


Return to V - Skyrim