How do you display a message when the plugin loads

Post » Sat Sep 28, 2013 5:30 am

I am trying to learn specific small things here and there and something I have been trying to do is display a message that the plugin loaded when you load your game. The plugin I am working with is JSwords.esm and it never had any psc or pex files that came with it. Any that might have been created were there because of my attempts. I have started over and deleted things from the plugin, I made sure there are no left over psc files or pex files because it wasn't working. I am trying to start from scratch.

Here is what I have:

1) I have a Message (MESG) Record with the message I want to display.
2) I Have a Quest but it's empty. No stages nothing.

What do I need next?

I'd like to know how to display the message two ways. What do I change in the CK to, 1) Display the message once the first time the plugin is loaded and never again. 2) Display the message every time the plugin is loaded such as every time you load a save game.

Here is what I http://youtu.be/3Ge-hXA-mQk.

User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Sat Sep 28, 2013 10:55 am

I mentioned this at the end of the last post, but I probably should have been clearer about it, apologies -- try entering nothing but a single semi-colon into the script fragment box, and then compile it. This will generate the quest fragment script you need. After it compiles, once that script exists, it will let you add a property via the property button, and then you can enter the code I originally posted into the box, and it should work. The reason it wont let you compile right now is because you don't have the property you need that you're trying to use in that script. (and you can't define the property in the script fragment box itself).

User avatar
Rich O'Brien
 
Posts: 3381
Joined: Thu Jun 14, 2007 3:53 am

Post » Sat Sep 28, 2013 12:15 am

  • "Run Once", "Start Game Enabled" Quest
    ScriptName YourQuestScript Extends QuestMessage Property kMESG AutoEvent OnInit()	Maintenance(True)EndEventFunction Maintenance(Bool abInit = False) ; Argument available for fork, If needed	If abInit		; It is the first load		kMESG.Show()	Else		; A save has been loaded where the mod has already initialized		kMESG.Show()	EndIfEndFunction
  • Player Alias
    ScriptName YourPlayerScript Extends ReferenceAliasYourQuestScript Property QuestScript Auto ; Point to your quest in editorEvent OnPlayerLoadGame()	QuestScript.Maintenance()EndEvent
Edit: *need to lay off the sauce*
User avatar
Alexx Peace
 
Posts: 3432
Joined: Thu Jul 20, 2006 5:55 pm


Return to V - Skyrim