Jump to content

Recommended Posts

Hi all,

sorry for my english, it'snt my first language.

 

I'm editing a mission during one of the objectives is to find and wear press clothes to approch the vip and kill him.

So i need the blufor units can really switch to civilian side in wearing press clothes !! And inverse the processus when the vip is dead and the blufor take back their original clothes !!

I'm a noob, sometimes i see here some script solutions but i don't understand how use them  ! Into the "init" case of the unit leader ??

 

Could you help me please ?

Thanks and all my apologizes for the language !

Share this post


Link to post
Share on other sites

About init fields:

The init field of any object/group  runs at start (of each player). Usually you'll find small code related to this  , which is a magic variable for the object/group.

But in fact, you can write what you want here, like in an init.sqf (non-scheduled).

 

You didn't mention if you elaborate a SP or MP scenario. I guess single player leading a group of AIs.

Wearing (by action) press clothes (or any civilian clothes) when player is BLUFOR (or even captive!) is not possible (Arma engine limitation). I had to script for that (script or module addon).
 

For your case, if you want to make it simple as possible, you have to decide a condition (not wearing civilian clothes!) to make your group joining a "fake" civilian group (not a problem with joinSilent command), then able to pick civilian clothes. (doesnt work!) Example: that can be the proximity of a crate containing the press clothes....

 

 

Edited by pierremgi
Changing side doesn't affect the possibility for wearing a civilian uniform.
  • Like 1

Share this post


Link to post
Share on other sites

Hi pierremgi, I'm pretty sure I'm not mistaken when I assume you speak French given the first name in your nickname. Moreover, the fact that you are from French Polynesia confirms my assumptions. I apologize if I got it wrong. Tell me and I'll rewrite everything in English.

First of all, thank you for taking the time to read and respond to me.

 

Then, in fact, I would like this scenario to be playable alone or in co-op! So yes I had more or less understood by reading on the right and on the left that the passage by a change of camp towards the "civilians" was obligatory.

 

So I am describing this part of the script again to you: after having done a lot of stuff, the BLUFOR team (the players or the player with or without AI) must go to a place where journalists' clothes, cameras and microphones (I have everything I need). Once the clothes are found they must put them on in order to be able to approach a dictator to shoot! Once this is done, I wish they would return to the hideout, change again and become BLUFORs again in order to continue the mission. I more or less understood the process: they arrive near the trigger placed on the way to the cash register, in the attributes they become civilians, can therefore change, take the accessories, get closer, do what they have to and then this is where I have a huge doubt (in addition to not knowing what to put where): is it enough for me that another trigger is on the way back (which I will have voluntarily deflected so as not to interact? with the previous one) to reverse the process ??

I am trying to understand the language and syntax of the scripts but I admit swimming in deep water, at my age the neurons are not as efficient as they used to be !! I tried to go to your Workshop looking for you there (before following the link of your addon) to follow you but there was a problem. The link to your addon allowed me to correct this and I was also able to follow you on Steam, hope you don't mind.

I don't want to abuse it, but could you give me an example of the kind of changes I'm going to have to apply to your script if you allow me of course?

 

Again a huge thank you for your answer, I hope you don't mind and that I'm not exaggerating too much !!

Hurry to read you.

Best regards.

Coucoudemaline.

Edited by coucoudemaline
english translation

Share this post


Link to post
Share on other sites

Answered by PM. Please post in English (even between natives) This is a public forum. Questions and answers are supposed to help further.

  • Like 1

Share this post


Link to post
Share on other sites

First of all, my bad, I didn't remember that changing side has no effect on result: wearing civilian clothes remains impossible without advanced script.

 

So, if you have my addon, just run this extra code for player (in initPlayerLocal.sqf for example):
 

[] spawn {
  waitUntil {sleep 1; uniform player isEqualTo "U_C_Journalist"};
  {_x setCaptive TRUE; if (!isPlayer _x) then {_x forceAddUniform "U_C_Journalist"}} forEach units player;
  waituntil {sleep 1; !alive bob};
  {_x setCaptive FALSE; _x forceAddUniform "U_B_combatUniform_mcam"} forEach units player;
};

 

If you don't have it, test a workaround like this :(

Place a small trigger around a crate:
type ANYPLAYER present, (depending on other players, played sides...)
activation code:

newGroup = createGroup CIVILIAN;
{[_x] joinSilent newGroup; _x forceAddUniform "U_C_Journalist"} forEach units (thisList #0);


 

Empty the crate if you want... by an extra code

Then in initPlayerLocal.sqf, the second part:
 

[] spawn {
  waitUntil {sleep 1; uniform player isEqualTo "U_C_Journalist"};
  waituntil {sleep 1; !alive bob};
  newGroup = createGroup WEST;
  {[_x] joinSilent newGroup; _x forceAddUniform "U_B_combatUniform_mcam"} forEach units player;
};

 

  • Like 1

Share this post


Link to post
Share on other sites

For your

On 5/13/2021 at 12:17 AM, pierremgi said:

Wearing (by action) press clothes (or any civilian clothes) when player is BLUFOR (or even captive!) is not possible (Arma engine limitation).

 

 

 

I did a test.

I placed into an equipment box one NATO uniform and one set of civilian clothes

I started the mission and walked to the box.

I confirm that I can put on the uniform but I cannot put on the civilian clothes.

So you are correct.  I suspect that it is intentional so you can't swap clothes in the middle of a mission.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Joe98 said:

So you are correct.  I suspect that it is intentional so you can't swap clothes in the middle of a mission.

 

Yes, (weird) intended behavior. You can jump into any empty enemy vehicle, use their launchers or other weapons, but you can't dress in neither their uniform nor civilian ones.

The reason I did my own module.

  • Like 1

Share this post


Link to post
Share on other sites

Just in case : civilian units can wear anything they want, don't ask me why...

Have a civilian player switch sides as needed, you won't need any scripted solution that way.

  • Like 3

Share this post


Link to post
Share on other sites
On 5/12/2021 at 10:24 PM, coucoudemaline said:

I'm editing a mission during one of the objectives is to find and wear press clothes to approch the vip and kill him.

So i need the blufor units can really switch to civilian side in wearing press clothes !! And inverse the processus when the vip is dead and the blufor take back their original clothes !!

 

Start by using civilains. Dress them in army uniforms. Make them friendly to Blueforce and enemy of Redforce

 

Place an equipment box on the map. Empty the box.

In the box place Press uniforms. Start themission

Walk up to the box and switch into press uniforms

Carry out the mission

Return to the box and switch to army uniforms.

 

This works fine except Redforce will treat you as enemy and not as civilains.

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi all,

I'm sorry to answer so late  but that was a hard month into my job. All my apologises.

A creator has made a very good module that allowed the units to wear what you want !!

 

But i've a problem to switch the effects !

My BLUFOR units can wear civilian clothes and be safe with the OPFOR but when thes units wear back their uniforms they stay civilians !!! The OPFOR units let them do everything !!

I'll try to combinate his module and your solution !!

 

Share this post


Link to post
Share on other sites

Are you playing with setCaptive or join (a side) for your units?
What is the code you apply for that?

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

sorry for this delay but i went abroad !

 

To be honnest i am a poor noob who understand nothing from the code.

It took 4 hours to understand how your module works. I'm ashamed, i'm hiding !!

 

In fact, i would like the Blufor units dressed in civilian clothes can officially become Blufor units again in the eyes of the Opfor units when they put on their faction's uniform again.

 

I have absolutely no idea how to do it ! I miraculously managed to use your module to transform the Blufor into civilian but ....... nothing else !!

 

Really sorry, i am a burden !!

Share this post


Link to post
Share on other sites

After all this time, could you refresh what you are doing exactly? (module... has no link with side of the player. So how do you change the side?)

Share this post


Link to post
Share on other sites

Hi,

 

i've used your excellent module in my mission to change 3 Blufor units in civilians (Press and camera men) to can approach an opfor dictator and kill him ! That's works perfectly !!

After that, they must wear again Blufor uniforms to continue the mission, so i need they come back in the Blufor faction !! But they keep civilian statut !!!

 

Thanks to have read me !

Share this post


Link to post
Share on other sites

That's not my question. My module is for allowing any clothes, not changing side of the player. So, you run a code for that, without any link of the module, if I'm right. If you want more help, ask for the answer: which code?

Share this post


Link to post
Share on other sites

Hi,

 

ok !! ok !!! Sorry english is not my 1st language and i haven't understood the first time, my bad !! As you i speak french !

 

This is the code i've pasted in "InitPlayerLocal.sqf" :

 

[] spawn {
  waitUntil {sleep 1; uniform player isEqualTo "U_C_Journalist"};
  {_x setCaptive TRUE; if (!isPlayer _x) then {_x forceAddUniform "U_C_Journalist"}} forEach units player;
  waituntil {sleep 1; !alive "O_Officer_Parade_F"};
  {_x setCaptive FALSE; _x forceAddUniform "U_B_combatUniform_mcam"} forEach units player;
};

 

I hope that answer your question. A part is about the assassination of "O_Officer_Parade_F".

Share this post


Link to post
Share on other sites
[] spawn {
  while {true} do { 
    {_x setVariable ["unifs",uniform _x]} forEach units player;
    waitUntil {sleep 1; uniform player isEqualTo "U_C_Journalist"};
    {_x setCaptive TRUE; if (!isPlayer _x) then {_x forceAddUniform "U_C_Journalist"}} forEach units player;
    waituntil {sleep 1; uniform player select [0,4] != "U_C_" };
    {_x setCaptive FALSE; _x forceAddUniform (_x getVariable ["unifs","U_B_combatUniform_mcam"]) } forEach units player;
  };
};

I added a loop , not mandatory
I added a variable on each units for keeping the right uniform if there are some differences in group. You can simplify as you did before if all units wear the same uniform at start.
The second waitUntil  condition fires if you wore any civilian uniform (class starting with "U_C_"), not the press only.

You can try the same sort of thing for the first condition.

  • 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

×