Jump to content

Recommended Posts

Hello guys. I have a doubt, a trigger is activated during the mission, and soon after a player joins the match, JIP, it also states that it was triggered? I will clarify what I intend to do:
In initPlayerLocal.sqf:


if (Isplayer player) then {

waituntil {! isnull player};

//if you belong to group x, teleport

if (groupId (group player) == "Alpha 1-4") then {

player setposASLW (getPosASLW resp_base);
player setdir 130;
waituntil {(player distance resp_base) <10 && !(IsNull (findDisplay 46))};
sleep 5;
qg sidechat format ["% 1, Welcome aboard USS FREEDON, our provisional base.", name player];



};

waituntil {triggeractivated transport1}; // Here is the question of JIP

player addEventHandler ["RESPAWN", {
player setposASLW (getPosASLW resp_base);
player setdir 130;
}];

};

Well, what I intend is: You will initiate two groups, the assault group will respawn at the airport where you will jump from parachute, the second group, upon giving respawn, will be teleported to the USS FREEDON. When the Assault group enters the aircraft for the jump, the trigger activates, and in the initPlayerLocal, which awaits trigger activation, releases the event handler for the players. Because when someone dies the teleportation will be for everyone. What about JIP? will the triggeractivated waituntil work? since it was not on the occasion?

Share this post


Link to post
Share on other sites
2 hours ago, Djavu said:

In initPlayerLocal.sqf:


if (Isplayer player) then {

waituntil {! isnull player};

 

 

Holy moly, why?

How did you figure that one out?

Also how does the sidechat work out for you?

Didn't notice anything odd there? Heh.

 

initPlayerLocal.sqf is executed every time a player joins the mission, parameters passed are as follows:

params ["_player","_didJIP"]

Every player runs this file after joining your mission, no need to do any JIP checks since it will run in any case.

No need for ifs and waitUntils, the player is already defined at that point.

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites

As Grumpy said. The only thing you might have to use waitUntil for is for displays.

  • 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

×