Home   Help Search Login Register  

Author Topic: Dialog Changing Text  (Read 1052 times)

0 Members and 1 Guest are viewing this topic.

XXXVader

  • Guest
Dialog Changing Text
« on: 23 May 2003, 02:17:37 »
Im working on a menu its nearly finished, but I cant get the text to change where its suppose to.

The menu shows some statistics that change like Health:100% or duration of the game.  how can i put variables from the sqs files into the dialog menu?

Komuna

  • Guest
Re:Dialog Changing Text
« Reply #1 on: 23 May 2003, 15:41:59 »
I don't know how, because I'm new to dialogs.

But, what if you try the 'format' command?

At the script:

lbSetData [102, format["%1",MyHealth]]

If it doesn't work, change the syntax several times until you get the wanted results. ;)

XXXVader

  • Guest
Re:Dialog Changing Text
« Reply #2 on: 23 May 2003, 17:15:20 »
Believe me buddy ive tried, nearly went mad one night from trying too much.

Gameer_77

  • Guest
Re:Dialog Changing Text
« Reply #3 on: 23 May 2003, 17:26:52 »
If you are trying to make a title (RscTitles) then you can't change the text ingame.

However, if it's a normal dialog then you can change the text using 'ctrlsettext [idc,"text"]'.

Gameer

Komuna

  • Guest
Re:Dialog Changing Text
« Reply #4 on: 25 May 2003, 02:26:51 »
Exactly! It's <ctrlSetText> and not <lbSetData>.

1-GetDammage player - Health of the player
GetDammage player - Damage of the player

So, in your script:

ctrlSetText [101, format["%1",1-(GetDammage player)]]

where '101' is the idc of the class you want to edit.

Got it? If not, keep trying! ;)

XXXVader

  • Guest
Re:Dialog Changing Text
« Reply #5 on: 27 May 2003, 23:55:07 »
Thanks dude, Ill try it soon.