Jump to content

Recommended Posts

Is there a way to have an event fired when a user opens the pause menu? There's the onPauseScript in Description.ext but I need this from a module..

 

Thank you,

_SCAR.

Share this post


Link to post
Share on other sites

not the key, the display 49 (interrupt). Depending on what you intend to do with.

Example:

 

0 = [] spawn {
waitUntil {!isnull findDisplay 49};
(findDisplay 49) displayAddEventHandler ["mouseMoving", {player setDammage 1}]
};

 

or, even:


addMissionEventHandler ["eachframe", {
 if (!isnull findDisplay 49) then {player setDammage 1}
}];

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, _SCAR said:

Is there a way to have an event fired when a user opens the pause menu? There's the onPauseScript in Description.ext but I need this from a module..

 

Thank you,

_SCAR.

 

you can go this way:

 

[] spawn
{
  while {true} do
  {
    waitUntil {!isNull (findDisplay 49)}; // wait until pause-screen opened

	//your code

    waitUntil{isNull (findDisplay 49)}; // wait until pause-screen closed
  };
};

 

  • 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

×