OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: david-p on 11 Oct 2002, 14:55:06

Title: REAL name of a unit
Post by: david-p 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
Title: Re:REAL name of a unit
Post by: Bremmer 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!
Title: Re:REAL name of a unit
Post by: david-p 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 :)
Title: Re:REAL name of a unit
Post by: Bremmer on 11 Oct 2002, 20:07:38
Sorry didn't realise it was for MP.

Mabey you could try name _man instead.

 ???
Title: Re:REAL name of a unit
Post by: david-p on 12 Oct 2002, 00:29:10
yup thats it, thanx Bremmer!  8)