Welcome, Guest Wednesday 23rd April 2014, 15:22:41
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: units with selectable rank (displayed ingame)  (Read 525 times)
0 Members and 1 Guest are viewing this topic.
SgtSlick
Guest
« on: 11 Jun 2006, 19:04:11 »

I'm surprised to see that this hasn't been created yet. A unit where you choose the rank of the unit and all appropriate changes will be made on the uniform. So you can just walk up to the unit ingame and actually see that the unit is a captain, or sergeant, or anything you want it to be. I'm sure this won't be too hard.
Logged
remcen
Contributing Member
**
Offline Offline


a.k.a. hottentotten_mike


WWW
« Reply #1 on: 20 Jun 2006, 14:37:52 »

is there a getrank - command? don't think so, therefore it should be hard to implement
Logged

we're looking for members: IM:UC MOD
h-
Forum
Administrator
*****
Offline Offline


Formerly HateR_Kint


WWW
« Reply #2 on: 20 Jun 2006, 16:03:47 »

Well, it is possible...

For example FDF mod (IIRC) contains setObjectTextureable rank patches which you can set manually (in the mission editor or in a script) on a soldier, but of course that doesn't change according to the unit's rank (set in the editor)..

getRank function can be written, and I was writing such when I stumbled on some problems, and lack of time to solve them..
The problems were just with the method of storing the unit's default rating (the method is a whole other topic, UNN has later 'mastered' that with his get/setInteger functions etc..)) and if would have used some easier solution the function would have worked just fine..
UNN uses a basic version of the getRank function in some of his work..

Anyway, the ranks are based on units rating..
Each rank has a default rating value defined in OFP's main config and based on those values you can build a table of values which you can then crosscheck with the unit's rating and get the units rank...

With every kill (enemy or friendly) the unit's rating changes, so if you only check the unit's rating and base your rank on that you may get faulty results, depending of course when you use the function... With the situ in guestion this should not be a problem at all..
Someone who starts a mission as private could become a colonel in the course of the mission if he/she scores enough enemy kills..
Ok, that's fairly easy to overcome, you just check each units rating at the start of the mission and save their ranks (based on the ratings) somewhere..

With vehicles the rank you set in the editor acts a bit screwy, can't remember what exactly it was..
I think the rank was a bit weirdly 'distributed' in the vehicle, the rank you give for the vehicle in the editor is actually the driver's rank and the rest of the crew are exponentially higher ranks..
That's not a problem either, you just check the vehicle' (ie. the dirver's) rating and based on that give the driver his/her rank, and then give the rest of the crew higher ranks, like if the driver is private, then the gunner is corporal and the commander is sergeant..

Of course you would then need a soldier model on which you have the required selections to setObjectTexture the correct rank patch..
Logged

Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.
BigDawgKS
*
Offline Offline


« Reply #3 on: 21 Jul 2006, 18:31:37 »

is there a getrank - command? don't think so, therefore it should be hard to implement

There will be in ArmA.
Logged
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: