Jump to content
Sign in to follow this  
TheJay

Mission Start Dialog

Recommended Posts

I'm relatively new to ArmA scripting but I'm catching on pretty fast so I decided to dabble in some dialog scripting for the mission I'm putting together.

I am looking to have a dialog appear whenever new players join the game so they can choose their loadout. Unfortunately, I'm at a loss about how to get it to appear when they start playing. I can get it to work by calling it with an action but when it is in my player initialization scripts it doesn't show up. I'm guessing it's because when it tries to create the dialog it can't.

I've searched the forum but can't seem to find an answer. Any suggestions?

Share this post


Link to post
Share on other sites

I would like to know how to do this too. I presume you need this for a MP mission.

My similar situation is getting a Spawn Dialog to appear at the start of a MP mission, to allow the player to select where they should start.

I didn't think there would be anything difficult about showing a dialog at the start, but was proven wrong.

I'm guessing the problem is due to a clash between the briefing/map dialog appearing at the end of your init.sqf execution, resulting in any created dialogs being ignored.

Somehow, I figure, you need to be able to detect when the briefing/map dialog has been closed (or some similar event).

Share this post


Link to post
Share on other sites

Try a little delay or try waitUntil{!isNull player} for the JIP Clients. Maybe it helps icon_rolleyes.gif

Share this post


Link to post
Share on other sites

try a trigger that has the condition set to true.

the trigger sould be fired afther the briefing, and it gets fired on the joining player to.

Share this post


Link to post
Share on other sites

The trigger Unknown suggested works great. I just added a boolean called "continue" and set it to false with a waitUntil {continue}. Player spawns and the trigger sets "continue" to true which lets the script get on its merry way. Example below:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">continue = false;

//Waits for the player to spawn

waitUntil {continue};

//Opens the loadout dialog

player execVM "dialogs\plinit.sqf";

sleep 1;

//Waits for the loadout dialog to close

waitUntil {!dialog};

//Runs the spawn script

player execVM "player\playerSpawn.sqf";

waitUntil{!isNull player} doesn't quite work since the condition is satisfied before the map dialog is closed and the player spawns.

Thanks for the help.

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  

×