About "FloatingText" in general.
(If you know "FloatingText" well, then read next part)
I read about function "FloatingText" now.
This function, as Lua-API says,
"Display a text message at the specified location".
Function "FloatingText" has four parameters. First and second parameter are required. (or parameter 0 and 1 ?)
Code: Select all
FloatingText(string text, WPos position, int duration = 30, Nullable`1 color = nil)
Duration (time, when text disappear).
Default value = 30 ticks. For example, 25 ticks = 1 second.
Default color is white.
It defined here:
OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs
- - -
My code with different parameters.
It works.
(in lua file; for example, atreides03a.lua)
Code: Select all
mesto = WPos.New(10*1024, 15*1024, 0)
cvet = HSLColor.Purple
Media.FloatingText("qwerty", mesto)
Media.FloatingText("A B C D", mesto, 125)
Media.FloatingText("A B C D", mesto, 30, cvet)
Question:
Can I use parameter 1, 2 and 4 ?
Does exist correct scripting? When duration by default.
Something like this. But it does not work.
Code: Select all
Media.FloatingText("A B C D", mesto, cvet)