Jump to content
BlackbirdSD

Hide entire group until triggered?

Recommended Posts

I have been using "this hideobject true;this enablesimulation false;" for individual AI that appears when im close but how do you get this to work for a whole group?  When I put this code into the Init of the group, it doesnt work.

Thanks

Share this post


Link to post
Share on other sites

In group icon init:

for SP only:

{_x hideObject TRUE; _x enableSimulation FALSE} foreach units this;

for SP / MP:

if (isServer) then { {_x hideobjectGlobal TRUE; _x enableSimulationGlobal FALSE} forEach units this };

 

  • Like 2

Share this post


Link to post
Share on other sites
7 minutes ago, pierremgi said:

In group icon init:

for SP only:

{_x hideObject TRUE; _x enableSimulation FALSE} foreach units this;

for SP / MP:

if (isServer) then { {_x hideobjectGlobal TRUE; _x enableSimulationGlobal FALSE} forEach units this };

 

Thank you

Share this post


Link to post
Share on other sites
8 minutes ago, pierremgi said:

In group icon init:

for SP only:

{_x hideObject TRUE; _x enableSimulation FALSE} foreach units this;

for SP / MP:

if (isServer) then { {_x hideobjectGlobal TRUE; _x enableSimulationGlobal FALSE} forEach units this };

 

Stupid question but what does _x mean?  And if I want 2 groups and a separate trigger for each, how would I label them?

Share this post


Link to post
Share on other sites

You can find many answers in BIKI (and that prevents me from English explanation).

forEach

this (not _this)

 

Note: name your group as you like, with a global variable. (group1, guys15264, threeStooges...)
For a reverse situation when your trigger fires (I do recommend server only trigger or that will not work in MP, with these commands):

{_x hideobjectGlobal FALSE; _x enableSimulationGlobal TRUE} forEach units threeStooges;

 

 

  • 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

×