Jump to content
zagor64bz

[solved]Add High Command Module with trigger?

Recommended Posts

Hi, I'm trying to add he High Command Module to a unit, with a trigger,mid mission.

I try with 

modulename synchronizeObjectsAdd [unitname];

in the trigger act ....not working (same command work for support module for instance...).

Even try to swap unitname and modulename around as suggested while googling the matters....

 

I'll really like to give player HC only after he complete few assigned tasks....

Any suggestion? 

Thank you!

 

edit: is for a SP mission!

Share this post


Link to post
Share on other sites

modulename synchronizeObjectsAdd [unitname];

has never worked for me and just re tested and still no joy.

 

 

 

I use

player hcSetGroup [group unitname];

 

seems to be fine. 

  • Like 1

Share this post


Link to post
Share on other sites

modulename synchronizeObjectsAdd [unitname];

has never worked for me and just re tested and still no joy.

 

 

 

I use

player hcSetGroup [group unitname];

 

seems to be fine. 

It works..KINDA.

Maybe I'm missing something, but ALL the units on my side show up on the HC bar now...

This is the way I set it up:

 

unit(player)..+..HC module, synch to subordinate module...wich is sinch to3 infantry groups. Lets say alpha, bravo, charlie....

 

Usually, I would synch the player with HC module, but, I did not. I set up a radio trigger with 

player hcSetGroup [alpha];

When trigger fire,nothing work.

If I UNsinch subordinate from HC, THEN Alpha,Bravo,Charlie AND PLAYER group show on HC bar....so any other units on player side.....

 

WTF??

Share this post


Link to post
Share on other sites

If you just use the HC module they all show.

 

Player sync to HCC  == all same side units are now in HCC

 

Player sync to HCC sync to HCS,  only units that are synched to HCS or added using  hcSetGroup will be in HC

Share this post


Link to post
Share on other sites

If you just use the HC module they all show.

 

Player sync to HCC  == all same side units are now in HCC

 

Player sync to HCC sync to HCS,  only units that are synched to HCS or added using  hcSetGroup will be in HC

Maybe I did not explain myself clearly: player is UNsynch to HCC,wich IS synch to HCS, wich IS synch to Alpha,Bravo and Charlie groups.

 

With this set-up nothing works.

It works only if I UNsynch HCS from HCC (obviously with the radio trigger with on act;hcSetGroup.) but,as I say, ALL unit will show.

 

 

Actually, I didn't try to synch player to HCC, synched to HCS UNsynched to any groups. And THEN adding the groups via the hcSetGroup command in the trigger.... goin testing...

 

 

edit: damn..not working.... :P 

Share this post


Link to post
Share on other sites

"Maybe I did not explain myself clearly: player is UNsynch to HCC,wich IS synch to HCS, wich IS synch to Alpha,Bravo and Charlie groups"

 

I find this gives me an error if player not synched to HCC so I wouldn't expect it to function correctly.

The error is in the module so unless BIS fix it I can't see it working.

 

The last should work, it seems to work for me.

Share this post


Link to post
Share on other sites

"Maybe I did not explain myself clearly: player is UNsynch to HCC,wich IS synch to HCS, wich IS synch to Alpha,Bravo and Charlie groups"

 

I find this gives me an error if player not synched to HCC so I wouldn't expect it to function correctly.

The error is in the module so unless BIS fix it I can't see it working.

 

The last should work, it seems to work for me.

I really appreciated your help...I'll set up a simple test mission and post it,just in case you like to take a look.. :P

 

https://www.dropbox.com/sh/oa3fykbx8gcslfu/AAD8R77bwFWrZ07prAK9NXJLa?dl=0

Share this post


Link to post
Share on other sites

The HC module is not designed to we used by syncing in a running mission like how you can with supports.

 

Create a HCS module, sync to it all the groups you eventually want the commander to control.

Then create a standard gameLogic ( units > gameLogic > object > gamelogic ) and use this in place of where you would normally drop your HC and give it a name like hc.

Sync the HCS to the GL.

Then when you need to sync the player run this...

player synchronizeObjectsAdd [ hc ];
[ [ hc ], {
    if (isnil 'BIS_HC_mainscope') then {
        BIS_HC_mainscope = _this select 0;
        publicvariable 'bis_hc_mainscope'
    };
    _ok = _this execVM '\A3\modules_f\HC\data\scripts\hc.sqf'
} ] remoteExec [ "BIS_fnc_spawn", 2 ];
Where hc is the name of the gamelogic.

Only put it through a quick test in the editor.

  • Like 1

Share this post


Link to post
Share on other sites

I did it a different way larrow, I used GL to prevent the error that I was getting when there was no Commander, then I grabbed any groups that were all ready connected to HCS then added the player plus groups and deleted GL.

hcgrp = hcAllGroups gl ;player synchronizeObjectsAdd [hcc];deleteVehicle gl;{player hcSetGroup [_x]} foreach hcgrp
  • Like 1

Share this post


Link to post
Share on other sites

The HC module is not designed to we used by syncing in a running mission like how you can with supports.

 

Create a HCS module, sync to it all the groups you eventually want the commander to control.

Then create a standard gameLogic ( units > gameLogic > object > gamelogic ) and use this in place of where you would normally drop your HC and give it a name like hc.

Sync the HCS to the GL.

Then when you need to sync the player run this...

player synchronizeObjectsAdd [ hc ];
[ [ hc ], {
    if (isnil 'BIS_HC_mainscope') then {
        BIS_HC_mainscope = _this select 0;
        publicvariable 'bis_hc_mainscope'
    };
    _ok = _this execVM '\A3\modules_f\HC\data\scripts\hc.sqf'
} ] remoteExec [ "BIS_fnc_spawn", 2 ];
Where hc is the name of the gamelogic.

Only put it through a quick test in the editor.

 

 

 

I did it a different way larrow, I used GL to prevent the error that I was getting when there was no Commander, then I grabbed any groups that were all ready connected to HCS then added the player plus groups and deleted GL.

hcgrp = hcAllGroups gl ;player synchronizeObjectsAdd [hcc];deleteVehicle gl;{player hcSetGroup [_x]} foreach hcgrp

Thank you both..IT WORKS very well now...both suggested solution.

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

×