Jump to content
Sign in to follow this  
SirMrE

Toggle Dynamic Groups UI from script?

Recommended Posts

Hi everyone,

 

I have been searching, but without luck, for information on how to (if its all possible?) to toggle the Dynamic Groups UI (triggered by "U" by default).

Anyone know if a way to toggle it?

 

EDIT: I am trying to make the Dynamic Groups menu to show from an onclick even in one of my own dialogs.

Share this post


Link to post
Share on other sites

 

Thanks a lot, I think/hope I am in the right direction now!

 

My problem is now, if I try the following:

onButtonClick = "closeDialog 0; player action [""TeamSwitch"", player];";

the game crashes due to memory access violation.

Am I missing something here? Is the syntax I am using for "action" wrong?

 

Thanks again, I really appreciate the help with this

Share this post


Link to post
Share on other sites

Did you make sure to register the Dynamic Group system on both the server and player sides?  Were you testing in multiplayer?

 

Before that pressing U did nothing.  After that it at showed the normal teamswitch UI with some errors.  I'm guessing you need another player online for it to work?

 

Why is just pressing U not an option for this?

Share this post


Link to post
Share on other sites

["Initialize"] call bis_fnc_dynamicGroups

 

edit: sry, will find answer in a mo

Share this post


Link to post
Share on other sites

Did you make sure to register the Dynamic Group system on both the server and player sides?  Were you testing in multiplayer?

 

Before that pressing U did nothing.  After that it at showed the normal teamswitch UI with some errors.  I'm guessing you need another player online for it to work?

 

Why is just pressing U not an option for this?

 

Yea I have initialised it, though both in the map file:

 

supremacy.altis/InitPlayerLocal.sqf:
if (!isDedicated) then {
    ["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;
};
supremacy.altis/initServer.sqf:
if (isDedicated) then {
    // Initializes the Dynamic Groups framework
    ["Initialize"] call BIS_fnc_dynamicGroups;
};

When I hit "U" it shows up and works just fine, so I reckon its all good to go.

 

I run the dedicated server locally on the same computer as the game.

 

Pressing U is fine, but I just thought I would make a navigation option as well for those who are not aware of it being enabled and available. (Or in case they don't have it bound)

Share this post


Link to post
Share on other sites

findDisplay 46 createDisplay "RscDisplayDynamicGroups"

 

Well, there ya go!  One day I'll learn about displays. heh

  • Like 1

Share this post


Link to post
Share on other sites

findDisplay 46 createDisplay "RscDisplayDynamicGroups"

Awesome, Thanks!.

 

 

Well, there ya go!  One day I'll learn about displays. heh

Haha, I am with you on that one!

 

 

Much appreciated guys!

  • Like 1

Share this post


Link to post
Share on other sites

Well, there ya go!  One day I'll learn about displays. heh

 

I only had that answer lying around somewhere as I had to hijack the function so it would run additional actions during the course of people clicking on things.  I don't really like fiddling around in displays and dialogs too much tbh, as although I can code stuff OK for them, they're really boring to work with and a necessary evil of scripting (ie they're only there to get the job done).

 

I'd much rather be doing scripting like quad-bike volcanoes tbh!  xD

 

  • Like 1

Share this post


Link to post
Share on other sites

I only had that answer lying around somewhere as I had to hijack the function so it would run additional actions during the course of people clicking on things.  I don't really like fiddling around in displays and dialogs too much tbh, as although I can code stuff OK for them, they're really boring to work with and a necessary evil of scripting (ie they're only there to get the job done).

 

I'd much rather be doing scripting like quad-bike volcanoes tbh!  xD

 

 

And soon we have a map where the quad-vulcano can be applied and look... erm... natural? .. 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×