warning
We are aware of an issue with download statistics. See our status page for details.
I just implemented the ReadLine() function, which lets your Papyrus script grab keyboard input from the Terminal.
Example Papyrus code for the above demonstration:Scriptname PapyrusTerminal:Example02 extends PapyrusTerminal:PapyrusAPI
Function OnPapyrusTerminalInitialize(ObjectReference refTerminal)
; you can set text replacement tokens for the terminal here.
; example syntax:
; refTerminal.AddTextReplacementData("TokenName", Message)
EndFunction
Function OnPapyrusTerminalReady()
; once you get this event, the terminal is ready to be written to / read from
; ReadLine example
ClearScreen()
PrintLine("What is your name?")
Print (" > ")
CursorEnabled = true
String readName = ReadLine()
ClearScreen()
PrintLine("HELLO " + readName + "!")
EndFunction
Function OnPapyrusTerminalShutdown()
; if you get this event, the terminal is shutting down (user left holotape with tab, ctrl-c or by some other means)
EndFunction
More to come.
0 comments