Home   Help Search Login Register  

Author Topic: Loses Squad leader position/Command.  (Read 3436 times)

0 Members and 1 Guest are viewing this topic.

Offline Cougarxr7

  • Members
  • *
Loses Squad leader position/Command.
« on: 07 Jul 2009, 02:24:15 »
I do not know if this is a bug or part of the game. Thanks to Spooner, I have the respawn on squad leader working.
The problem now is, I lose squad leader position. Some Squad member takes over control.
Any know why this is happening?
Thanks
« Last Edit: 11 Jul 2009, 18:57:27 by Cougarxr7 »
If this thread is in volation of forum rules , please delete.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Loses Squad leader positon/Command.
« Reply #1 on: 07 Jul 2009, 04:16:28 »
Yep! That is how it works in Arma. When you die, quite reasonably your immediate underling takes over, but you don't automatically regain control when you respawn.

There is a selectLeader command that allows you to reset the control of the squad manually.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Cougarxr7

  • Members
  • *
Re: Loses Squad leader positon/Command.
« Reply #2 on: 07 Jul 2009, 05:10:53 »
I did not get killed when I lost the squad, icons just disappeared!
On this command, when it says name, is that the name assigned in the editor?
groupName < how do you assigned this group a name?
                 selectLeader
                                    unitName < this name is assigned in the editor, yes/no?
Thanks!
If this thread is in volation of forum rules , please delete.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Loses Squad leader positon/Command.
« Reply #3 on: 07 Jul 2009, 12:54:04 »
Variable "Names" refer to names added in the editor, yes, but it can be player or whatever other variable that contains the reference to a value.

To "name" a group, add this to the init of its members (yes, it needs to be all members):
Code: [Select]
assaultSquad = group this;
Then you can refer to the group as assaultSquad.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Cougarxr7

  • Members
  • *
Re: Loses Squad leader positon/Command.
« Reply #4 on: 07 Jul 2009, 13:07:32 »
Spooner, thank you so very much! I'm learning a whole lot because of you.

I took a guess at this and put it in the leader init,
  groupName selectLeader unitName
"charlieSquad selectLeader eng1;"
Hope it works!
« Last Edit: 10 Jul 2009, 14:34:43 by Cougarxr7 »
If this thread is in volation of forum rules , please delete.

Offline Rommel92

  • Members
  • *
Re: Loses Squad leader positon/Command.
« Reply #5 on: 10 Jul 2009, 02:21:07 »
To "name" a group, add this to the init of its members (yes, it needs to be all members):

The intention of putting it in all group members is simply to ensure the group gets named, in the case of one person in that squad not taking the 'leader' position.

Is there another way to do this without the hassle? Just inquisitive.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Loses Squad leader positon/Command.
« Reply #6 on: 10 Jul 2009, 23:46:14 »
Yes, strictly you only have to set the name on all of them if aiDisabled, since if the leader isn't played, then you won't get a name. Also, not completely sure what happens if the leader was being played or was AI, but died before you jipped in. In SP, you can safely just set the group name in the leader. So on some levels, I was just ensuring that this absolutely always works, rather than giving a detailed description of whether it works or not in which situation.

Sadly, I'm not aware of an easier way to ensure it. Could do it very easily if we could read the config in the SQM file (missionFileConfig is the config in description.ext, not mission.sqm), but never managed to do this. If anyone knows, then I'm all ears...
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Cougarxr7

  • Members
  • *
Re: Loses Squad leader positon/Command.
« Reply #7 on: 11 Jul 2009, 03:14:47 »
Spooner, where exactly is that file "missionFileConfig", went looking for it. Of course did not find it.
If this thread is in volation of forum rules , please delete.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Loses Squad leader positon/Command.
« Reply #8 on: 11 Jul 2009, 14:31:49 »
As usual, giving out faulty info :whistle: Should be missionConfigFile. It isn't a file, but is the way to read values out of the configuration values in description.ext.
Code: [Select]
_respawnDelay = getNumber(missionConfigFile >> "respawnDelay");

Reading config information is a rather large topic, so I won't explain it in any more detail. As I was saying, although we do have missionConfigFile to read the details from description.ext, we do not have access to read the info out of mission.sqm.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)