Jump to content

Recommended Posts

@pierremgi and @Larrow can't get any of the scripts/codes from the two posts above to work. I don't understand why this is so hard to get this done.  I just want the support to be used by two playable/switchable units in the mission. The mission is for SP or a small coop group. I had some code that allows the support to follow the player on any unit he team switch into but that was for SP only. Should I just give up on this and move on or can this be done with some workaround script ? Avibird

Share this post


Link to post
Share on other sites
On 1/27/2022 at 10:22 PM, avibird 1 said:

@pierremgi and @Larrow can't get any of the scripts/codes from the two posts above to work. I don't understand why this is so hard to get this done.  I just want the support to be used by two playable/switchable units in the mission. The mission is for SP or a small coop group. I had some code that allows the support to follow the player on any unit he team switch into but that was for SP only. Should I just give up on this and move on or can this be done with some workaround script ? Avibird

What are you trying to do? There is a video above that shows how to do it

Share this post


Link to post
Share on other sites
On 1/28/2022 at 4:22 AM, avibird 1 said:

@pierremgi and @Larrow can't get any of the scripts/codes from the two posts above to work. I don't understand why this is so hard to get this done.  I just want the support to be used by two playable/switchable units in the mission. The mission is for SP or a small coop group. I had some code that allows the support to follow the player on any unit he team switch into but that was for SP only. Should I just give up on this and move on or can this be done with some workaround script ? Avibird

Personally, I gave up trying to switch supports when the player switches.

If I remember, the event handler "teamSwitch" is firing only when the player uses the switch menu (U key).

Even in this case, the goal is difficult.

Sorry, I will not spend more time on that.

 

 

Share this post


Link to post
Share on other sites

I have it working. I have two playable units both on different squads that both can use the support vanilla modules when a player switch into that particular unit on each squad. The only issue or downside the number of uses of each module will reset each time you switch back into that unit. So you can't limit the use of artillery support and close air support in a mission because if a player switch into one of the units that has access it will reset each time to the full number of ticks that was initially set in the modules.  Yes it works but some you can't set limits for a mission. Avibird. If anybody wants the code I'm using I will post it.

Share this post


Link to post
Share on other sites
3 hours ago, avibird 1 said:

 Yes it works but some you can't set limits for a mission. Avibird. If anybody wants the code I'm using I will post it.

Sure it's always better to post a code on forum. That can help. And you knows, your overall limit for a mission could be simpler than it appears, after having a look at the code.

Share this post


Link to post
Share on other sites

Hey pierremgi the script was larrows the link for the codes was 6 posts up

 

https://lars.myftp.biz/3W2UzRq 

 

 

If you can set the limit that would be great. You can set the time between call and  set the limit just like in the vanilla support modules but when you switch into a new unit and then back into one of the two units that have access to the modules the number of usage gets reset back to the original value.  Sincerely Avibird if you can figure out how to set the limits that would be awesome.

Share this post


Link to post
Share on other sites

Strange. With Larrow's scripts , the limit (set in requester module) is available for all playable units you switch, and the counts are working without reset.

For artillery, see:   player getvariable "bis_supp_used_artillery"

Tested in Larrrow's mission example.

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

×