Messagebox Globals

Post » Wed Aug 07, 2013 8:19 am

Another thing I need to learn has turned up. Globals, globals, globals. When talking to an npc about a specific topic I want a messagebox to show the number of 5 different items in the akSpeaker's inventory. This akSpeaker could be a lot of different npcs.

This is the text of the messagebox (it has the dialogue's quest as Owner Quest):

Number of Item01:

Number of Item02:

Number of Item03:

Number of Item04:

Number of Item05:

And this is the dialogue script fragment:

Global01.Value = http://forums.bethsoft.com/topic/1469160-messagebox-globals/akSpeakerRef.GetItemCount(Item01)Global02.Value = akSpeakerRef.GetItemCount(Item02)Global03.Value = akSpeakerRef.GetItemCount(Item03)Global04.Value = akSpeakerRef.GetItemCount(Item04)Global05.Value = akSpeakerRef.GetItemCount(Item05)GetOwningQuest().UpdateCurrentInstanceGlobal(Item01)GetOwningQuest().UpdateCurrentInstanceGlobal(Item02)GetOwningQuest().UpdateCurrentInstanceGlobal(Item03)GetOwningQuest().UpdateCurrentInstanceGlobal(Item04)GetOwningQuest().UpdateCurrentInstanceGlobal(Item05)ItemCountMessage.Show()

It doesn't work though. So what am I missing?

User avatar
james reed
 
Posts: 3371
Joined: Tue Sep 18, 2007 12:18 am

Post » Wed Aug 07, 2013 7:28 am

global01.http://www.creationkit.com/SetValue_-_GlobalVariable( YourFloat ).... :-)

edit: Global01.SetValue ( ( akSpeakerRef.GetItemCount ( Item01) as Float ) ) in your case.

and you might want to consider using object arrays and while loops for what you do there.

User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am

Post » Wed Aug 07, 2013 12:49 am

No difference after that minor change... as to the object arrays and while loops I'm not sure what you want me to do.

User avatar
Jay Baby
 
Posts: 3369
Joined: Sat Sep 15, 2007 12:43 pm


Return to V - Skyrim