Need scripting help.

Post » Wed Jun 20, 2012 1:56 am

So, I've modded Fallout for three years. I know that scripting language like the back of my hand, I just need help learning the neuances of this new one.

I want to set up a 'cutscene' of sorts. Not involving NPC's, though. Just objects and whatnot. I want to make it so that when a player activates a pedestal, it plays animations and certain things happen. Explosions are spawned at certain times, objects enabled, sounds played. That kind of thing. Can someone run me over the basics of how I would do this in Papyrus?

In Fallout, I would use a staged timer, along with things like 'Playsound' or 'MyObjectRef.Enable' to achieve what I wanted. However, it is my understanding that all of these things are now slightly different.

Thanks!
Alexander J. Velicky
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm

Post » Wed Jun 20, 2012 7:10 am

This would be better suited as a http://www.creationkit.com/Scene

And that makes the scripting quite easy, just use a Fragment in your quest tied to the button that when pressed, calls .Start().

You can use the scene editor to time everything you want to happen.
User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm

Post » Tue Jun 19, 2012 10:05 pm

Aren't scenes only for NPC coordination and activity type stuff? What I want to do has no NPC's in it at all, would I still use a scene?
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Wed Jun 20, 2012 6:05 am

I don't know much about scenes, but from what I remember this is the kind of thing for which they're intended.

It should still be possible to do via scripting, though. Instead of using the more complicated setup required for a staged timer in previous games, you should just be able to use http://www.creationkit.com/Wait_-_Utility to fairly easily achieve the delays you're looking for. I recommend you at least take a look at scenes before trying it this way, though.

Cipscis
User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Tue Jun 19, 2012 8:46 pm

Without knowing exactly what you're trying to accomplish, I would recommend just making a quest for the 'scene'. You can use the OnUpdate event to make it fire every 0.1, 0.5, 1.0 seconds or whatever you want. You can set the event to animate an explosion, then send it to another State to play another (or multiple) actions/animations/effects. I'm sure you can Re-register for update to change the timing at each state or like Cipsis suggested, the Utility.wait(X) command is very useful.
User avatar
Talitha Kukk
 
Posts: 3477
Joined: Sun Oct 08, 2006 1:14 am

Post » Tue Jun 19, 2012 5:09 pm

Alright, sorry I was doing a lot of level design and now I'm ready to dive into this script. So, a scene you guys say? Very well, I'll give it a swing.

From reading the Scenes tutorial and browsing around the scene window it would appear that what I need to do is have a series of Phases filled by 'Actors' (Which will actually be my objects), with a bunch of Timers on them that run papyrus fragments to get the scene done. Does this sound right to you guys? Also, do the fragments run at the start or end of the timer? I would assume start? Also, can I run all the fragments off just one object Alias, since it should work on any declared alias, right? (So if I have a 'Control Panel' alias, for example, in it's timer's papyrus fragment I could say like "Portal Alias.enable()" to enable whatever object 'Portal Alias' might be; right?)

Thanks again everyone! I'm diving in and getting used to all this new alias stuff, as well as the new blocktypes and scripting stuff. :biggrin:
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Tue Jun 19, 2012 4:04 pm

So, I need help with this. I'm trying to place script fragments on the Timer block things in my scene, but the scripts wont compile. It doesnt recognize the alias's from the quest, like it would in the quest script. There is a 'Properties' button, but it doesn't do anything when I click it so I cannot manually define the properties or anything... The scripts wont compile, as I'm guessing the scene wouldn't do anything.

Can anyone help? :/

EDIT: Nevermind! The scene has it's own scripts, with properties defined therein. I set up the properties for the object references that I need to in the scene script area, and it now compiles and all that. This appears to be exactly what I need to make this little cutscene happen. I'll report back when I'm done just to let everyone know if it worked out.
User avatar
Zach Hunter
 
Posts: 3444
Joined: Wed Aug 08, 2007 3:26 pm

Post » Wed Jun 20, 2012 3:05 am

To solve the properties tab not doing anything, type in something arbitrary in the fragment box and save it. IE: int temp When it's saved you can open the properties tab
User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm


Return to V - Skyrim