Jump to content
Sign in to follow this  
Horner

disableUserInput question

Recommended Posts

I'm sorry if this has already been answered but I can't find it. How would I go about doing a disableUserInput once the mission loads? I tried this in the init.sqf:

waitUntil{!isServer};

disableUserInput true;

And then I have when a person walks into a trigger it activates a script that has dialogue and at the end of the dialogue it has the disableUserInput false;

Anyone know how I could do this?

Edited by Horner

Share this post


Link to post
Share on other sites

Obviously I already clarified that I can't find it, and if you found the answer how difficult is it to add the answer into your otherwise useless comment?

Share this post


Link to post
Share on other sites

I just removed it from my mission, and if I did remove the isServer check it would disable your input at the briefing screen and you couldn't load in.

Share this post


Link to post
Share on other sites

The !isServer waitUntil will lock up, as ArmA2 will be waiting until the player's computer is not the server (which will never happen, unless they were not to begin with). Player==player is good for checking, as player will not return correctly until their client has initialized.

For the initial cutscene, off the top of my head, you could try:

if(!isDedicated and player == player) then {
myMission_cutscene = {
	if (player in list _this) then {
		disableUserInput true;
	};
	//Insert rest of custscene
	disableUserInput false;
};

disableUserInput true;
//Insert rest of custscene
disableUserInput false;
};

Then in your trigger, spawn the code block with the following command:

null = thisList spawn myMission_cutscene;

Haven't tested that, but should work :) Good luck!

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  

×