Jump to content

How can I make a script that shows text boxes once I reach certain lev


Omeletter

Recommended Posts

I am making a mod, and I need a script that shows text boxes once I reach certain levels, e.g. level 8, 20, whatever. The problem is, I have no idea what to do, and the "Hello World" tutorial is total waste, really. I did not understand it, I didn't learn anything either. All it did was show me how to use what it showed, and only what it showed.
Link to comment
Share on other sites

When you gain a level, the Story Manager receives the event and will try to start the quests in the event node 'Increase Level'.

 

So you should attach a quest to the node, and add a script to it that calls up your messages and then stops the quest until the next time it gets started up again.

 

The quest should not have 'Run Once' checked and it should not be 'Start Game Enabled'. You can use something like this for the quest script:

 

Scriptname Example extends Quest

Event OnStoryIncreaseLevel(int aiNewLevel)
 Debug.MessageBox("You have just reached level " + aiNewLevel + ".  Congratulations!")
 Stop()
endEvent

Link to comment
Share on other sites

OK, thanks.

 

Can I make a script that goes something like this? What you showed me runs the script every level up, and shows the same message I take?

 

Run the script when you reach level 8,

show a dialog box. (You have reached level 8, etc, etc.)

Run the script again when you reach another level, e.g. 12

Show another different dialog box. (You have reached level 12, etc.)

 

Is that possible?

Edited by Omeletter
Link to comment
Share on other sites

Scriptname Example extends Quest

Message Property MSGLVL8 Auto
Message Property MSGLVL12 Auto

Event OnStoryIncreaseLevel(int aiNewLevel)
if (aiNewLevel == 8)
	MSGLVL8.Show()
elseif (aiNewLevel == 12)
	MSGLVL12.Show()
endif
Stop()
endEvent

 

EDIT: When you add the quest to the event nodes, you can also specify conditions. So if you want, you can condition it so that your quest only runs if the player reaches level 8, 12, etc.

Edited by fg109
Link to comment
Share on other sites

A lot more total noob questions incoming here...

 

"extends Quest" so, I need to create a quest, then attach it to the event node? Why do I need a quest anyway for something like this? If I really do, how do I make it? :confused:

 

"Message Property MSGLVL8 Auto

Message Property MSGLVL12 Auto"

What are they? Where do I define what they are? In a quest?

Can't I just do something like this from Hello World?

 

Debug.MessageBox("Hello, World!")

Edited by Omeletter
Link to comment
Share on other sites

The story manager only starts quests. So in order to use it, you need to create a quest. If you didn't want to use the story manager, then you would have to create a script and put it on the player, and you'd have to script it so that it checks the player's level every couple of seconds to decide whether or not to display messages. Since that would you to constantly run another script (even though it's a very short one) I told you about the story manager instead.

 

And those are properties that you use to to point at message objects in the Object Window, under Misc. I don't know what messages you wanted to display, and in Skyrim, you can only add buttons/choices through message objects, and not something like:

 

MessageBox "Message Text", "choice1", "choice2"

Link to comment
Share on other sites

Ok, thanks. I'll try what you told me later on, and see if i can get this to work.

If you're wondering, the mod I'm making is basically lesser powers, shouts, etc. get stronger as you level, and I got that to work. Now I just need text boxes that pop up as you reach certain levels, informing you of your new powers.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...