Noob question on displaying text messages on screen

Post » Tue Jun 19, 2012 12:59 pm

I am very new (writing my first script now, but I am a long time programmer in the real world languages) and I am having problems with this.

I want to have a text message displayed on screen when the player enters a room in my cave. Having the message spoken is optional and not necessary.

I am trying the following in one of the ambush triggers from the Warehouse Ambushes interior cell without success:

...
Auto State waiting  Event OnTriggerEnter(ObjectReference triggerRef)    Debug.Notification("Hello, World!")    self.Say(TopicToSay)  EndEventEndStateTopic Property TopicToSay  Auto  
...

The debug notification is being displayed but I can not get the Say to display or speak anything. I have tried a lot of various options (player, self, etc) with no joy.

Would someone have pity on a new modder and give me a hint how to do this.

TIA

Frank
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Tue Jun 19, 2012 5:10 pm

It may not be possible to make the player say something if that's what your trying, also you would need to have recorded voice for your dialogue or subtitles on to know anything happened.
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Tue Jun 19, 2012 6:32 pm

Xtynct, thank you for you response. I don't care if it is the player or the trigger box, or even if I have to place an invisible NPC in the room. Mainly I want text to show up on screen as a result of the trigger event fired by the player entering the room.

I figured out how to do this in Oblivion a long time ago and have since forgot how that worked, but I do recall I had the ability to have either a line of text or a dialog box show up on screen.

Thanks again,

Frank
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Tue Jun 19, 2012 9:59 pm

http://www.creationkit.com/Message
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am

Post » Tue Jun 19, 2012 11:57 am

h4vent,

Thank you for your reply. I saw that while trying to figure this out and could not make any sense out of it. The example given is:


; Display a simple message to the user
HelloWorld.Show()

Apparently "HelloWorld" in that example is an object of class Message?? But, no where can I find an example showing how to instantiate a message class object or how to initialize it??

Can you help with a simple HelloWorld example? I would really appreciate it!

EDITED TO ADD: Thank you very much, I went back to the Creation Kit and last time I looked for a menu/dialog something that would create a message and could not find one, this time I filtered the object panel on Message and looked at ALL and sure enough there were some Messages, so I duplicated one and renamed it and it works. Thank you very much - :)


Frank
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Tue Jun 19, 2012 8:30 pm

Message Objects are under Miscellaneous in the Object Window.

So, create a Message ... Then, in your Quest script, make that message a Property, (right click script and add a Property, with a type of Message) which is what HelloWorld is, and then you can use the code as written

If you need help with what the heck all these properties and things are, see cipscis' excellent tutorial (which is what the wiki lacks, it assumes you know all about this to start with):

http://www.cipscis.com/skyrim/tutorials/beginners.aspx
User avatar
ashleigh bryden
 
Posts: 3446
Joined: Thu Jun 29, 2006 5:43 am

Post » Tue Jun 19, 2012 8:12 pm

Thank you very much, I went back to the Creation Kit and last time I looked for a menu/dialog something that would create a message and could not find one, this time I filtered the object panel on Message and looked at ALL and sure enough there were some Messages, so I duplicated one and renamed it and it works. Thank you very much - :smile:
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Tue Jun 19, 2012 12:51 pm

If you wanted the line actually said (like with audio) you could probably just record whatever as a sound/audio file and then have a script play the audio. The say function only works with actors I believe, you could probably use an invisible NPC too, but that just seems like a less elegant solution. Also on top of the Message type, you can also just use Debug.MessageBox("whatever you want shown"), similar to Debug.Notification except that its an actual messagebox that pops up with an 'okay' button.
User avatar
Queen of Spades
 
Posts: 3383
Joined: Fri Dec 08, 2006 12:06 pm


Return to V - Skyrim