Jump to content

Group.getByName() for client groups returns null in MP


Recommended Posts

Posted (edited)

Hi guys,

 

I was trying to use one of my scripts in MP the other day and figured that Group.getByName() returns null for a client group. Is it a known issue or something I might be missing.

 

Thanks in advance for any help!

 

UPDATE: I should mention that the group consists of a single unit, and it was spawned at the time when the script was executing.

Edited by sea2sky

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted

Is there more than one client slot in your group?

Does it also happen if you have only 1 client in your group?

 

There are a couple of known issues that have been reported.

Please verify the above questions and provide feedback.

 

Sven

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Posted
Is there more than one client slot in your group?

Does it also happen if you have only 1 client in your group?

 

There are a couple of known issues that have been reported.

Please verify the above questions and provide feedback.

 

Sven

 

Hi Sven,

 

these are the questions I've asked my self too. So, I stripped the mission down to just one client group with a single aircraft (originally I had that group with 2 units). And yes, it still returns null. The same code works just fine in SP. I tried both - put the AC in the air or a cold start - no matter what it does not work.

 

local group = Group.getByName('alpha') -- where 'alpha' is the name of the client group

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted

There is one thing though... When exactly is this code executed? Does the group already exist? I mean, really exist. That means, a player joined that unit?

Client units or groups don't exist in the sim if they aren't manned with players.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Posted
There is one thing though... When exactly is this code executed? Does the group already exist? I mean, really exist. That means, a player joined that unit?

Client units or groups don't exist in the sim if they aren't manned with players.

 

I don;t want to set a false statement, so I will try again tonight, and re-confirm. But I'm kinda positive that I set the group in the air, so I was in the cockpit by the time script was executing.

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted
I don;t want to set a false statement, so I will try again tonight, and re-confirm. But I'm kinda positive that I set the group in the air, so I was in the cockpit by the time script was executing.

 

Please do. I have experienced similar situations like the one you described when designing missions. Runs fine in SP, but in MP the mission starts before you're in a plane. So this brings an additional different dynamic.

 

Pls check and let us know.

 

Fc

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Posted

My bad, I did not realize that a mission starts as soon as you start server, so the script was executing before me getting into the cockpit. I've hooked the script on ONCE-->GROUP ALIVE and it works now as it should. Any ways, thanks for your interest.

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted
My bad, I did not realize that a mission starts as soon as you start server, so the script was executing before me getting into the cockpit. I've hooked the script on ONCE-->GROUP ALIVE and it works now as it should. Any ways, thanks for your interest.

 

assumed this would be the issue indeed. No worries. Happened to me too, still does sometimes :-)

 

Fc

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...