Home   Help Search Login Register  

Author Topic: Highest ranking unit?  (Read 1814 times)

0 Members and 1 Guest are viewing this topic.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Highest ranking unit?
« on: 18 May 2004, 17:45:05 »
 I've looked all over the forums, and through the FAQs, but I can't seem to find a way to detect the highest ranking unit on a certain side. I have a surrender cutscene that I would like to begin with the camera targetting the most senior eastern unit that is surrendering. I have no way of knowing beforehand which enemy troops will survive the fight, so I'm trying to find another way of targetting a survivor.

 I'm assuming my cutscene will begin with:

 _man = highest ranking enemy soldier
_camera settarget _man
etc...

 but how do I define which soldier?

I've tried 'leader east_units' but that does nothing (not even an error message)

Any ideas?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #1 on: 18 May 2004, 18:09:34 »
Yes, unfortunately BIS has left out a somewhat useful 'rank' function...  :(

Maybe you just need to use a dummy officer which you setPos to where you need him once the cutsecene begins...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Highest ranking unit?
« Reply #2 on: 18 May 2004, 18:16:38 »
Thanks HateR,

 Will have to cheat a little and create a target then.   Cheers for the quick reply.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Highest ranking unit?
« Reply #3 on: 18 May 2004, 20:03:22 »
One slight problem...

 Because I have no idea which enemy units will survive... how do I know which group to put the new createunit in? The command reference says you must specify a group.

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:Highest ranking unit?
« Reply #4 on: 18 May 2004, 20:25:44 »
Wait a second, guys. I think there's a command that you can use to get unit's rank.
I'm talking about the rating command. If used on an AI controlled unit, it returns a number from 0 to 7500 (I think, I'm not at all sure :() depending on the unit's rank.
Need to try it, I've tested it maybe 2 years ago - but I think it's gonna work  ;)
« Last Edit: 18 May 2004, 20:26:19 by Jezuro »
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Highest ranking unit?
« Reply #5 on: 18 May 2004, 20:30:41 »
But what command would I use to determine the unit with the highest rating?

 I think I'll keep working with the creatunit command... I can get my head round that one. Thanks for the help... I'll investigate the rating command at a later date...

Dubieman

  • Guest
Re:Highest ranking unit?
« Reply #6 on: 18 May 2004, 20:32:52 »
Wasn't it 10,000 cause I remeber when I was an avid multi player and tryed making my own maps.

To make all west soldiers do a deathmatch you put something like addrating (10000) and a lot of other syntax stuff. Maybe the higher the rating the more cause the allies have to pop you one.... Not sure..... :-\

Or maybe that rating thing was for kills and objs..... :-\

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Highest ranking unit?
« Reply #7 on: 18 May 2004, 21:18:40 »
Rating has nothing to do with rank.    It is mostly to do with how many bad/good guys the unit has shot.  

The only effect rank has is on on the fleeing of units:  don't get bogged down with RL rank structures, they are not really relevant in the game.

By far your best bet is a minor rethink on how the cutscene starts:  if necessary just fake it, the player doesn't know who the highest ranking enemy left alive is anyway.
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #8 on: 18 May 2004, 21:35:44 »
It's been a good while since I last played about with ratings, but macguba is right...

I think there are functions relating to rank and courage in the game engine but they still have that "advanced designer" switch on...

At least in the config.cpp you can see that the rank Colonel has a numeric value of 7500 and colonels courage is 0.90...

It also seems that the basic ratings of all units are hardcoded as I can't find any mention of 'rating' in the config...

Quote
By far your best bet is a minor rethink on how the cutscene starts:  if necessary just fake it, the player doesn't know who the highest ranking enemy left alive is anyway.
Quite.
If I remember correctly, CWC campaign is full of this...  ;)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dubieman

  • Guest
Re:Highest ranking unit?
« Reply #9 on: 18 May 2004, 22:16:44 »
I wouldn't think that they put colonels in the line of fire....

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #10 on: 19 May 2004, 09:00:57 »
The colonels rating vaule in the config.cpp file (7500) is how many points you get/draw away for killing him. If you kill a private I think it's like 200 points or something like that, a colonel and you got 7500 points.

:beat: *Gets Shot* :beat:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #11 on: 19 May 2004, 10:09:30 »
Oh, ok... That means then that the ranks array in config contain the rating for the different ranks, not some other as I thought they would...

But still, you can't get the highest ranking unit with rating because the AI also gets rating from shooting nmes... :(
Of course, you could make an assumption that who has the highest rating is the highest in rank...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #12 on: 19 May 2004, 10:12:11 »
M8, I don't think you understand what I meant. Everyone starts at 0 rating, when you shoot a colonel on the enemy side you get 7500 rating points. And so on. If you are a colonel you start on 0 as any other guy.

:beat: *Gets Shot* :beat:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #13 on: 19 May 2004, 10:23:01 »
Quote
If you are a colonel you start on 0 as any other guy.
Not quite so...

If you go to the editor and test this by adding the line hint format ["%1",rating this] in the players init field and preview with different ranks, you will see that the rating IS dependant of your rank...

Same goes for the AI...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #14 on: 19 May 2004, 10:28:23 »
Hmmm... Do it like this then. Put out a private on desert island, nothing else. Preview, use endmission cheat, 0 points. Now do the same thing but change the rank to colonel, 0 points...

You can also check the Online ComRef: http://www.ofpec.com/editors/comref.php?letter=R#rating

Hmmm...

:beat: *Gets Shot* :beat:

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #15 on: 19 May 2004, 10:32:39 »
Also try this: Do the same thing as last post xept the cheat thing. Place a few enemy soldiers and a trigger alpha radio with a hint format ["%1", rating player] line. Now, preview the mission as colonel. You start with 7500, shoot the guys, hit the trigger and it says 9100. Use endmission cheat, voila, you got a score of 1600? ??? (I got 1600, 4 guys)

:beat: *Gets Shot* :beat:
« Last Edit: 19 May 2004, 10:33:15 by The real Armstrong »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #16 on: 19 May 2004, 10:45:01 »
Yup...

And I got 800 points of 4 guys... 200 a head, and they all were colonels... ???
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #17 on: 19 May 2004, 11:06:00 »
Hmmm... OK... Points for killing you get from which kind of type of soldier it is (officers gives more score than soldiers) . Points from being which doesn't show up in debriefing but in command (pain in arse) you get from rank. Why did BIS design it this way?

:beat: *Gets Shot* :beat:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Highest ranking unit?
« Reply #18 on: 19 May 2004, 11:31:26 »
Quote
Why did BIS design it this way?
lol..
This question can be asked on several other occations as well.. ::)

Yeah, the score is related to the type of unit killed...
Annoying indeed...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Highest ranking unit?
« Reply #19 on: 19 May 2004, 11:50:54 »
OK, now to solve the problem of the thread.

If you have any colonels, give them a value, like a global variable with the name, say, TRAisthebest = 10
If you ahve any majors, give them a value, like a global variable with the name, say, TRAisthebest = 9
If you have any captains, etc,

Then, check which alive unit that has the highest value of TRAisthebest. If there are more than 1, simply do a random script and we are done! :)

:beat: *Gets Shot* :beat: