Home   Help Search Login Register  

Author Topic: the percent sign  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
the percent sign
« 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

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:the percent sign
« Reply #1 on: 28 Jun 2005, 17:49:31 »

Offline 456820

  • Contributing Member
  • **
Re:the percent sign
« Reply #2 on: 28 Jun 2005, 17:53:55 »
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 ?

qqqqqq

  • Guest
Re:the percent sign
« Reply #3 on: 28 Jun 2005, 18:44:27 »
The example in the link shows you how to use multple things.

Yes.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:the percent sign
« Reply #4 on: 28 Jun 2005, 18:44:47 »
quoted directly from the comref

Quote
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.

Offline 456820

  • Contributing Member
  • **
Re:the percent sign
« Reply #5 on: 28 Jun 2005, 18:45:48 »
thanks alot i think ive done it just havent tested

CopyrightPhilly

  • Guest
Re:the percent sign
« Reply #6 on: 28 Jun 2005, 20:00:44 »
another example...

Code: [Select]
_value1 = "hello"
_value2 = "bye"

hint format ["%1 --- %2",_value1,_value2]

exit