Jump to content
Sign in to follow this  

Recommended Posts

I'm trying to find a way to get a script to execute for jip players. The script is safe for all players currently in the game, so it can be activated from a trigger if necessary. I've tried using a blufor trigger placed covering the respawn area with the condition "this" then I went to the lobby and chose a different player slot and then rejoined the mission, but the trigger did not activate. If I moved the trigger a few feet away, and then rejoined the mission, the trigger would activate once I stepped into the trigger radius, but I cannot get it to activate if the player enters the mission already standing inside the trigger. So I figured I would ask for help with this. Again, the script doesn't have to be executed from a trigger, but I don't know of another way to do it.

Share this post


Link to post
Share on other sites

If you have not set the trigger to repeatable then it will only trigger once. And even then all current blufor would have had to leave the area when the JIP joins.

If you goal is to run a script for any joining player (JIP or not) then I use this trigger:

Condition: local player
On Act: 0 = [] execVM "playerSetup.sqf";

Share this post


Link to post
Share on other sites

The trigger was set to repeatedly. I tried what you said and it still won't work for me. I hosted a non dedicated server, once I was in the game, I hit escape and went back to lobby and chose a different player slot and then rejoined the mission and the trigger will not activate "if" I am already standing in it. It will activate if the trigger is next to me and I step into the radius, but I can't have it setup that way because how do I know what direction some other player is going to head in - and I need it to activate right away.

I do appreciate the help.

I can't even get another trigger to detect that I've even rejoined the mission using "alive player" as a condition check and an On Act hint.

Share this post


Link to post
Share on other sites

Hi,

You can use the Multiplayer Framework, by placing the Functions module on the editor and for example:

waitUntil { !isNil { BIS_fnc_init } };  //Make sure framework is loaded
if (local TAG_someUnit) then  //Make sure we run the following code on one machine only
{
  [nil, nil, "per", rEXECVM, "myScript.sqf", _argument1, _argument2] call RE;
};

_neo_

Share this post


Link to post
Share on other sites
//init.sqf
YourTAG_JIPplayer = not isServer && isNull player;

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  

×