Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
mondkalb

FindDisplay does not work in Multiplayer

Recommended Posts

Aloha folks,

I have a very nasty problem, the "FindDisplay" returns "No Control" in a Local hosted/dedicated server session, while it returns the desired Control in singleplayer without any problems.

This is what it looks like:

_blah = ((findDisplay 70) displayCtrl 7010);

player groupchat format ["%1", _blah];

In SP the textmessage states "CONTROL #7010". In MP same mission's testmessage tells me "NO CONTROL".

Do you have any Idea how I can trick Arma2 to get the lbSelection command working in MP?

Or has anyone a better idea to create an array that contains all selected listbox items? LbIsSelected has the same issue as lbSelection, I've already tried that.

They both require a "_control" to work, and that can obviously not be provided in MP.

Share this post


Link to post
Share on other sites

I'm using findDisplay and displayCtrl very extensively in the mission I'm making and there has not been any problem with either in our MP tests.

Try to find out if you're actually getting anything off findDisplay in the first place:

disableSerialization //UI namespace might complain...
_displ = findDisplay 70;
_ctrl _displ displayCtrl 7010;

hint format ["Display: %1\nControl: %2", _displ, _ctrl];

BTW, maybe onLBSelChanged UI event handler would do what you need?

Edited by Deadfast

Share this post


Link to post
Share on other sites

Thanks!

After checking the problem with your code example, I found out that FindDisplay actually works. "displayCtrl" is the actual one that causes troubles...

In SP the hint shows:

Display: Display #70

Control: Control #7010

In MP the hint shows:

Display: Display #70

Control: No Control

Any ideas how to trick Arma2?

I've also thought about the UI-Eventhandlers, but I'm trying to find out all items that are selected in the listbox, and solving the problem via UI-Eventhandlers is going to be a very sophisticated solution...

Share this post


Link to post
Share on other sites

Unfortunately not.

That command only returns the topmost selected. If I select 20 Items, it returns 20. If I select all from the first to the 20th entry, execept for the 19th, it still returns 20. And so on...

Share this post


Link to post
Share on other sites
Sign in to follow this  

×