OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 28 Jun 2005, 17:21:38
-
okay ive seen a few things using this like this or something close
%,_arrayvalue
and you can use that in hints and radio messages and it will show what the _arraycalue is like if i was using a function wich returned the exact distance from the player and an object the returned value is something like
_dist
then i want to be able to get what that distance is and put it in a radio message
how wil i do this i did have a quick look in the comref but couldnt really find the right thing
-
format command (http://www.ofpec.com/editors/comref.php?letter=F#format).
-
thanks alot but how about multiple things would use %1 %2 and so on then at the end just state all the right things in order and with commas also can i use
_dist and things like that ?
-
The example in the link shows you how to use multple things.
Yes.
-
quoted directly from the comref
format ["%1 - %2 - %1", 1, "text"]
looks like multiple things to me. and yes, you can also use local variables and global variables too. it's a very handy command.
-
thanks alot i think ive done it just havent tested
-
another example...
_value1 = "hello"
_value2 = "bye"
hint format ["%1 --- %2",_value1,_value2]
exit