Home   Help Search Login Register  

Author Topic: REAL name of a unit  (Read 1030 times)

0 Members and 1 Guest are viewing this topic.

david-p

  • Guest
REAL name of a unit
« on: 11 Oct 2002, 14:55:06 »
ive looked around, and it would seem no1 else has had this problem before.
the situation is thus: as a/the player (single/multi) enters a trigger, i want a warning message saying the road ahead is trapped. this is what i have so far.
in the trigger [thislist select 0] exec "btrap.sqs"
then in the script
_man = _this select 0
hint format ["Be warned, %1, the area ahead is booby trapped. Kill the officer!",_man]
And its fine, except what i see is
"Be warned, West Golf Black: 1, the area......."
now these players are named, but obviously the game insists on calling them by their proper names.
to cut the already long story short, any way to make it display a players name, instead of e.g. West Golf Black: 1
thanks in advance
dave

Bremmer

  • Guest
Re:REAL name of a unit
« Reply #1 on: 11 Oct 2002, 15:55:24 »
Try:

hint format ["Be warned, %1, the area ahead is booby trapped. Kill the officer!", name player]

That should stick your name in instead of the editor one. eg If I was playing it would say:

Be warned, Bremmer, the area ahead is booby trapped. Kill the officer!

david-p

  • Guest
Re:REAL name of a unit
« Reply #2 on: 11 Oct 2002, 19:28:40 »
yeah, that works if I'm trying it on my own, but i want it in a multiplayer. ill have 2 test it, as i thought "player" wasnt valid in MP speak :)

Bremmer

  • Guest
Re:REAL name of a unit
« Reply #3 on: 11 Oct 2002, 20:07:38 »
Sorry didn't realise it was for MP.

Mabey you could try name _man instead.

 ???

david-p

  • Guest
Re:REAL name of a unit
« Reply #4 on: 12 Oct 2002, 00:29:10 »
yup thats it, thanx Bremmer!  8)