OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MONOLITH on 08 Oct 2003, 19:17:42
-
Just a quick question.
Does anyone know how to display a variable in a string e.g hint box. For example i want to display the score of a side in a hint box.
I know in visual basic you do it like this msgbox "blah" & variable name
Anyone know how to do it in flashpoint?
Thanks.
-
hint format ["%1", variable]
Something like that.
:beat: *Gets Shot* :beat:
-
Yes.
hint format["Health: %1",getDammage player]
For instance.
-
@ KTotte nd armsy - next taam leave dis Qs 2 me- itll help me boost ma post count :P i lead only in 2 above macca :-X :o ::)
@ Mono
or in titletext u can use
titeltext [format["Health: %1",getDammage player],"plain down"] ;D
LCD OUT
-
k - gonna have to top that then ;D
hint format ["%1\n2", var1,var2]
would even let you display 2 variables
%1 is the placeholder for the first variable after the output-string, %2 for the second one.
You can also go on, using such placeholders - e.g: %1 %2 %3
and so on.
hint format ["%1 %2 %1", var1, var2]
would also be possible and result in:
var1 var2 var1
~S~ CD
-
k - gonna have to top that then ;D
hint format ["%1\n2", var1,var2]
lol ;D
just 1 thing
u forgot 2 put da % dere :P ::)
it shud b
hint format ["%1\n%2", var1,var2]
LCD OUT
P.S deres no way ny of u wil pass ma post count its 2400 n somin now :P
-
:o indeeeeeeeeed :-[
just thought i should keep you an open backdoor
to be able, top'in dat ;D
~S~ CD
-
I'm going to top that, but I need to lay low for a while... KTottE almost gave me a warning. :'(
:beat: *Gets Warned* :beat: