Page 1 of 1

AddVizText

Posted: Mon Oct 22, 2012 9:55 am
by enric
AddVizText(GetUnitX(id),GetUnitY(id), "IDS_TEXT", "ffffffff", 1);

Is there a way to add a value here?, i.e.

"my text: " + a dynamic value

Re: AddVizText

Posted: Mon Oct 22, 2012 3:12 pm
by pipfromslitherine
AddVizText uses and optimisation which doesn't allow dynamic strings I'm afraid, only IDS_ defined ones.

Cheers

Pip

Re: AddVizText

Posted: Mon Oct 22, 2012 3:20 pm
by enric
But, is there a way to show dynamic values other than the usual used in DrawScenarioUI?

turns = GetGlobal ("GameTurns") - GetTurn() ;
PrintInt(turns) ;

Re: AddVizText

Posted: Mon Oct 22, 2012 3:23 pm
by pipfromslitherine
I'm not sure what you mean. On the map? On the screen (which you can already do, as you say, in DrawScenarioUI). What precise problem are you trying to solve.

Cheers

Pip

Re: AddVizText

Posted: Mon Oct 22, 2012 3:26 pm
by enric
I want to show a string, has I'm doing now with the AddVizText(GetUnitX(id),GetUnitY(id), "IDS_TEXT", "ffffffff", 1);

The string appear over a specific unit in specific circumstances, the string should add a value referring to the object data (which changes every turn) related to the specific work of the unit.

Re: AddVizText

Posted: Mon Oct 22, 2012 6:00 pm
by pipfromslitherine
Yeah - you can't do that. Sorry.

Cheers

Pip