Home   Help Search Login Register  

Author Topic: Using GlobalChat With Name  (Read 759 times)

0 Members and 1 Guest are viewing this topic.

TERA_Forrest

  • Guest
Using GlobalChat With Name
« on: 04 Jun 2005, 21:26:08 »
I have a spot in my coop where homey(player) has to click on "talk" via "addaction" to get some info.  I've got the whole speech made out but for the life of me I can't get the name of the person speaking to come up.

this is what comes up:

noncombatant: BLA BLA BLA

I need it to say:

Resistance Contact: BLA BLA BLA

I've tried to use the:

c1 name "Resistance Contact"

but I'm getting errors with it.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Using GlobalChat With Name
« Reply #1 on: 05 Jun 2005, 09:21:27 »
Quote
c1 name "Resistance Contact"

but I'm getting errors with it
Well you would.  name is a function that returns a value not a command that changes the value.  So:

name c1

will return a string that is the name of c1.  Names should be set in description.ext and then setIdentity used in the mission to link the unit to the identity (part of which is their name).

All of that is irrelevant to your problem though.  Whatever their name in the mission you will not be able to make it appear where you want it in global/side/vehicleChat.  It is a known feature of OFP I'm afraid.


Quote
noncombatant:

Implies a civilian - right?  If so try this:

In the mission editor put a high ranking resistance soldier and set the condition of presence to false. Group your civilian with him and then in the init field of your civilian put:

this setCaptive true

This will change your civilian into a resistance fighter but set him/her so they will not be attacked by AI soldiers.

That should give you something else instead of noncombatant.

As for their name you will just have to type it in at the start of each line of their speech
« Last Edit: 05 Jun 2005, 09:25:26 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:Using GlobalChat With Name
« Reply #2 on: 05 Jun 2005, 10:07:03 »
what about setgroupid
like this
this setgroupid ["Resistance contact", "groupcolor0"]
that will call him
Resistance contact 1
that mnight work

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Using GlobalChat With Name
« Reply #3 on: 05 Jun 2005, 11:47:53 »
No it won't.

group setGroupId id

Operand types:
group: Object or Group
id: Array
Type of returned value:
Nothing
Description:
Set group identity. Id format is [letter,color,picture] or [letter,color]. Letter is one of: "Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "Kilo", color is one of "GroupColor0" to "GroupColor7".

TERA_Forrest

  • Guest
Re:Using GlobalChat With Name
« Reply #4 on: 05 Jun 2005, 14:51:53 »
darn, oh well I suppose I can live with that.  Thanks for the replys fellas ;)

Offline 456820

  • Contributing Member
  • **
Re:Using GlobalChat With Name
« Reply #5 on: 05 Jun 2005, 18:52:14 »
thobson you say picture ? whats that
also you have missed out zulu and yankee they were in the official campaign and work for me and novemeber isnt it basically the whole pheonetic alphabet ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Using GlobalChat With Name
« Reply #6 on: 05 Jun 2005, 19:07:38 »
It only goes this far actually:

Alpha
Bravo
Charlie
Delta
Echo
Foxtrot
Golf
Hotel
November
Kilo
Yankee
Zulu
Two
Three
Buffalo
Guardian
Convoy
Fox

And THobson was correct in that he was quoting from the command reference, which doesn't include them all in the list.


Planck
I know a little about a lot, and a lot about a little.