Home   Help Search Login Register  

Author Topic: format  (Read 759 times)

0 Members and 1 Guest are viewing this topic.

_Ross_

  • Guest
format
« on: 25 Sep 2003, 05:18:47 »
how do you use the format command? like for an example use it to show variable contents in a hint.

thanks! ;D
« Last Edit: 25 Sep 2003, 05:19:29 by _Ross_ »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:format
« Reply #1 on: 25 Sep 2003, 07:36:29 »
Like if you wanna have the damage of a vehicle:

hint format ["Yoooooo! Here's your bloody number!!! 1%", getdammage vehicle]

Sumthin like that, syntax's probably wrong.

:beat: *Gets Shot* :beat:

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:format
« Reply #2 on: 25 Sep 2003, 07:55:54 »
Syntax is right ;)
Not all is lost.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:format
« Reply #3 on: 25 Sep 2003, 09:16:53 »
Quote
syntax's probably wrong.

Quote
Syntax is right

Analysis from Armsty himself was correct, syntax is wrong
but not too much;

it's %1, and not 1%

So it should look like:

hint format ["~S~ %1", name player]

would look like:

loud ping sound, followed by top-left white hint:

~S~ [BF] ChrisDeath

Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:format
« Reply #4 on: 25 Sep 2003, 10:35:31 »
There are a couple of examples in the online version of the command reference in the Ed Depot.   (It's called COMMANDS in the left hand menu.)  I wrote them there myself so that I could check the syntax myself whenever I have the same problem as you, which is frequently.
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:format
« Reply #5 on: 25 Sep 2003, 16:10:59 »
A good thing about format is that you can get the name of the player. This is good in MP games and in dialouges. Like this:

titletext ["Man on Drugs(Armsty) - Yo! Whazzzzzzzzzzzzzzzzzzup Dude!", "PLAIN DOWN"]

titletext [["%1 - Not much man, just the ordinary Hollywood/Game routines. Saved the world, beat up an evil wizard, saved the blond chick.", "PLAIN DOWN"], name player]

Don't think Syntax is right on this one either, but you get the picture?

:beat: *Gets Syntax Errors* :beat:

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:format
« Reply #6 on: 25 Sep 2003, 17:55:03 »
should be like this Armstrong for tittletext

Titletext [Format ["%1", name player],"Plain Down"]
« Last Edit: 25 Sep 2003, 17:55:31 by Black_Feather »