Home   Help Search Login Register  

Author Topic: Player Names in Multiplyer  (Read 1031 times)

0 Members and 1 Guest are viewing this topic.

dth47

  • Guest
Player Names in Multiplyer
« on: 19 Mar 2004, 15:24:11 »
Hi there, sur one of you gurus can help me out :).

Made a MP mission with a cutscene start focusing along the playable units. All i want is a script to display their name on screen:

eg player 1s Multiplyer name is BAM and he is unitname op1.

Also a way to make the text scripts stop after a desegnated amount of time?

titletext ["text","PLAIN"]

then what????


Much Appreciated
Dave

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Player Names in Multiplyer
« Reply #1 on: 19 Mar 2004, 16:11:49 »
titleText [format ["%1",name op1],"PLAIN DOWN"]

The above would print the name of op1 on screen.

I don't understand your second question. Stop how? Desegnated time?

You can exit scripts with the command exit. You can set delays in scripts with ~time ie. ~5 would wait for 5 seconds. if your runnig a loop you can do like this

_count = 0
_max = 10

#loop
hint format ["Number of times looped: %1",(_count) +1]
~5
_count = _count +1
?_count == _max: exit
goto "loop"
Not all is lost.

Harkonin

  • Guest
Re:Player Names in Multiplyer
« Reply #2 on: 19 Mar 2004, 16:51:16 »
format format

Operand types:
format: Array
Type of returned value:
String
Description:
First argument of array is format string. Format string may contain references to following arguments in form %1, %2, etc. Each %x is replaced by corresponding argument. %x may appear in the format string in any order.

Example:
format ["%1 - %2 - %1", 1, "text"]


Offline Solom

  • Members
  • *
  • Ya iam sitting on my arse ...
Re:Player Names in Multiplyer
« Reply #3 on: 22 Mar 2004, 11:56:47 »

>Also a way to make the text scripts stop after a desegnated amount of time?

if u take the exaple above  
...
titleText [format ["%1",name op1],"PLAIN DOWN"]
...
... and u want to limit the time the text is shown to 3 seconds try ...
titleText [format ["%1",name op1],"PLAIN DOWN", 3]


sometimes the "timeing" of OFP is ....

if u need exact timeing go for

titleText [format ["%1",name op1],"PLAIN DOWN"]
~3
titleText [format [" ","PLAIN DOWN"]

~3 == wait 3 seconds