Does anyone know the function paramater format for "Print" to display longer on screen?

Trying to make it so the message stays on screen longer after running Print.

Print<native><public>(Message:[]char, ?Duration:float = external {}, 
    ?Color:color = external {}):void

is the declaration of a string in verse. I have tried every possible way (tuples, manually entering parameters) to call this with all 3 parameters, but get an error every time.
Does anyone know how to properly call Print and how the parameter format needs to be?

Hey Adam! Just took some time to figure this out! I will definitely be switching to using Print() instead of Logger.Print()

Here’s the structure that you need, for both the duration & color! :slight_smile:

There’s also a massive list of web colors within the Verse digest we can access just make sure to include the import path!

Print("ELIMS-TO-WIN: {EliminationsToWin}", ?Duration := 5.0, ?Color := color{R:=255.0,G:=0.0,B:=0.0})

# Module import path: /Verse.org/Colors/NamedColors
Print("ELIMS-TO-WIN: {EliminationsToWin}", ?Duration := 5.0, ?Color := CornFlowerBlue)

Just a screenshot of my Print() with the full red color.
image

3 Likes

Thank you @spankysully1, will test this out now and reply here with my results!

Note that the ?Color syntax with the question mark denotes the parameter as optional. Means you can leave out ?Color or ?Duration you don’t need both.

3 Likes

It worked! Does anyone know what to input for ?Duration to make it infinitely display on the screen?

So Print is intended to be used for debugging, not for UI. So if you want to do UI work, you’ll need to start diving into VerseUI.

I started with this:

And you can see it used in my quick proof of concept for my last game jam using it here: Tactics Game Proof of Concepts | Talks and demos