OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: TERA_Forrest 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.
-
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.
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
-
what about setgroupid
like this
this setgroupid ["Resistance contact", "groupcolor0"]
that will call him
Resistance contact 1
that mnight work
-
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".
-
darn, oh well I suppose I can live with that. Thanks for the replys fellas ;)
-
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 ?
-
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