Scripting help needed - where the hell is "gamemode"

Post » Mon Jun 18, 2012 9:29 pm

Hey guys, I'm trying to make a motionblur mod and I'm trying to write a script that runs continually in the background running the imagespace modifier. However, the thing fails to compile.

This is what I've got so far:

Scriptname aaMotionBlurScript extends Quest  {Activates Full-Screen Motion Blur}imod MotionBlurEnd

What am I missing?
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am

Post » Mon Jun 18, 2012 2:09 pm

Take a look at this section on the wiki: http://www.creationkit.com/Differences_from_Previous_Scripting#Replacing_GameMode

Cipscis
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Mon Jun 18, 2012 9:34 am

I already had a look at that, but unfortunately was not enlightened. I hope you'll forgive me, I'm very new to scripting and was actually quite glad that it was you who answered the topic - I saw one of your posts on nexusforums talking about gamemode, but even after reading the thread and also reading the page you sent me, I'm still at a bit of a loss. I remember you telling the guy you were helping to replace onUpdate with oninit, but I still don't really get what's going on. I basically want this thing to be running all the time. A silent quest is added which runs from game start, and which the script is tied to. The script continually requests an imagespace modifier on the player. So I know the chain of what I'd like to happen, but I've got no idea how to tie the script to run in gamemode or whatever it's replacement is. I'm not even sure which one of these would be appropriate as a replacement.
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Mon Jun 18, 2012 4:47 pm

In order to get your script up and running right away, you'll want to use an http://www.creationkit.com/OnInit event. In that event, you can call http://www.creationkit.com/RegisterForUpdate_-_Form, which will cause any http://www.creationkit.com/OnUpdate_-_Form event in your script to be triggered every X seconds, where you have specified X.

For example, this script's OnUpdate block will run every 5 seconds:
Event OnInit()	RegisterForUpdate(5)EndEventEvent OnUpdate()	; Do stuff hereEndEvent

I hope that helps :)

Cipscis
User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am

Post » Mon Jun 18, 2012 2:36 pm

Thanks, I think I understand a bit better now. Unfortunately, I've got no way of testing it because apparently, my blur shaders aren't working. :/ So the imagespace modifier I created does toss all. When (If?) I get it sorted, I shall try this again with the working ISM. Thank you very much for your help :)
User avatar
Jessica Phoenix
 
Posts: 3420
Joined: Sat Jun 24, 2006 8:49 am

Post » Mon Jun 18, 2012 3:06 pm

For testing, http://www.creationkit.com/Notification_-_Debug can be very useful, especially if you're not even sure if your script is running. It prints a message to the screen.

Also check out the "Having trouble with Papyrus?" stickied thread for more debugging information.

Cipscis
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Mon Jun 18, 2012 6:10 pm

Thank you, I will do so :)
User avatar
sarah
 
Posts: 3430
Joined: Wed Jul 05, 2006 1:53 pm


Return to V - Skyrim