AddVizText

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

AddVizText

Post 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
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: AddVizText

Post by pipfromslitherine »

AddVizText uses and optimisation which doesn't allow dynamic strings I'm afraid, only IDS_ defined ones.

Cheers

Pip
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: AddVizText

Post by enric »

But, is there a way to show dynamic values other than the usual used in DrawScenarioUI?

turns = GetGlobal ("GameTurns") - GetTurn() ;
PrintInt(turns) ;
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: AddVizText

Post 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
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: AddVizText

Post 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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: AddVizText

Post by pipfromslitherine »

Yeah - you can't do that. Sorry.

Cheers

Pip
Post Reply

Return to “Battle Academy : Modders Corner ”