<- CRPL reference <- Text Commands

SetPopupText

ArgumentsResultNotation
Text to appearA mouse-over text.s1 -

Description

SetPopupText creates a mouse-over text for the unit the script is attached to.

If you want the mouse-over text to combine variables and strings, see the concat function.

Examples

Set a mouse-over text of “Hello”

#Standard Notation
"Hello" SetPopupText

#Warp Notation
SetPopupText ("Hello")

Create a unit text tooltip, based on values from variables within said unit, by concatenating values and strings together.

The reason there is an endline here: “endlInterval: ” is to add a new line to the string.

once
   @awake
endonce

:awake
64 ->power
30 ->interval
42 ->cookies

"" ->tooltipText
<-tooltipText "Power: " concat <-power concat ->tooltipText
<-tooltipText "
Interval: " concat <-interval concat ->tooltipText
<-tooltipText "
Cookies: " concat <-cookies concat ->tooltipText

<-tooltipText SetPopupText