Jump to content
Sign in to follow this  
Spatsiba

player addAction on Dedicated

Recommended Posts

Hey! 

 

I've been trying to make an action appear for all players within 1.5m of a table. It works perfectly fine in SP but not on dedicated. 

I assume it's the "player" part that breaks it but honestly I wouldn't know. It's a script I made for ArmA2 that functioned properly back then.  

 

Code in init: 

Spoiler

_role = player;

rga1 = [_role addAction ["Execute Script", "script.sqf", ["Target", target1], 1, false, true, "", "player distance table <= 1.5" ]] remoteexec ["addaction",0];

 

Purpose: Create action "Execute Script" for all players including JIP that go near a table. Repetable. 

In SP "Execute Script" action appears, script fires, everything's fine. 

In Dedicated MP the action doesn't appear, script can't fire, everything's terrible. 

 

Any help would be much appreciated! I've been trying to fix this for much longer than I should've without asking for help. 

Share this post


Link to post
Share on other sites

first of all you should add action to table instead player. If table exist at mission start you need no other tricks for multiplayer.

If not  you need to remoteexec addaction on spawned table for all players including JIP.

This because addaction command has local effect.

  • Like 1

Share this post


Link to post
Share on other sites
On 2017-09-15 at 1:01 PM, davidoss said:

first of all you should add action to table instead player. If table exist at mission start you need no other tricks for multiplayer.

If not  you need to remoteexec addaction on spawned table for all players including JIP.

This because addaction command has local effect.

Thanks for the help! 

 

The thing is I call two parms through the addaction but surely I can change them. I'll just make some cases for each one I guess. 

I'll try and see if it works :)

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  

×