RedxYeti Posted December 6, 2022 Share Posted December 6, 2022 I was wondering if I could use ui.invoke() to use the notifications in the top left for my own use. I don't own Adobe flash nor do I really want to learn how to make a widget for hudframework when all I need is a message to show up longer than a debug notification, but not stop the game. Link to comment Share on other sites More sharing options...
DieFeM Posted December 6, 2022 Share Posted December 6, 2022 You can use ShowAsHelpMessage, it can be shown indefinitely, until you use UnshowAsHelpMessage. Link to comment Share on other sites More sharing options...
RedxYeti Posted December 6, 2022 Author Share Posted December 6, 2022 You can use ShowAsHelpMessage, it can be shown indefinitely, until you use UnshowAsHelpMessage.That would be fine if it supported any strings. The info I want to show changes more than I can put into messages. Link to comment Share on other sites More sharing options...
CrEaToXx Posted December 6, 2022 Share Posted December 6, 2022 How does it not support strings? Also no, unless you reverse engineer the HUD framework. Unfortunately we do not have the same level of transparency in UI code, as we did for Skyrim. The function you want to invoke to is simply missing in the HUD framework. Edit: actually I was wrong about transparency. Scrivener07 did it some 2 years ago. But I don't how he's related to the "official" HUD framework and/or script extender team. https://github.com/F4CF/Interface Maybe ask on their Discord channel? Link to comment Share on other sites More sharing options...
RaidersClamoring Posted December 6, 2022 Share Posted December 6, 2022 It is possible you could find some solution but it's unchartered waters and you will have to do some digging into HUDmenu.swf and its many scripts. I believe HUDmessageItemData and HUDmessageItem are the ones to investigate as well as their corresponding sprite container, HUDMessageItemInternal_mc or PromptMessage_mc. And I think Set() will need to be involved more than Invoke(). There are some public actionscript elements exposed to you: public var messageText:Stringpublic var isWarning:Booleanpublic var isRadioStation:Booleanpublic function HUDMessageItemData(param1:String, param2:Boolean, param3:Boolean)public function get data()public function set data(param1:HUDMessageItemData)override public function redrawUIComponent() But mostly it's Private and Protected. You will likely end up doing more experimentation than actual creation. Link to comment Share on other sites More sharing options...
RaidersClamoring Posted December 13, 2022 Share Posted December 13, 2022 I figured it out using the ShowAsHelpMessage-option. Try it? ; cgf "menu.MessageInject" in consoleFunction MessageInject() Global ; ...or MessageInject(String someString), and then replace 1234, 5678 with someString CloseConsole() ; convenience function ; this is an empty message from Fallout4.esm Message Msg = Short(0x48328) as Message ; short is also a convenience function ; initiate the message. Params are in the wiki. Msg.ShowAsHelpMessage("Jump", 15, 0, 0) ; To set text without creating var arrays, this doesn't shrink/grow the textfield to fit but you you have other possibilities, see last comment. String SimpleSetText = UI.Set("HUDMenu", "root1.HUDNotificationsGroup_mc.TutorialText_mc.TutorialText_tf.text", "1234") ; Better way to set. Shrinks/grows box to fit text. You must create a var array first even if just one element. String BetterSetText = UI.Invoke("HUDMenu", "root1.HUDNotificationsGroup_mc.TutorialText_mc.SetText", VarArray(1, "5687")) ; conv. function ; if you for some reason need to check what text is currently in this "movieclip": String GetText = UI.Get("HUDMenu", "root1.HUDNotificationsGroup_mc.TutorialText_mc.TutorialText_tf.text") ; if it has been played once as helpmessage, it needs to be reset before reuse Message.ResetHelpMessage("Jump") ; It is also possible to manipulate other parameters than ".text" within TutorialText_tf. For instance ".textHeight". Include a float in your var array to specify size. Use UI.Set() ; https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#propertySummaryEndFunction Link to comment Share on other sites More sharing options...
Recommended Posts