Page 1 of 1

Open and close a pause menu - Fix'd

PostPosted: Sun Aug 14, 2011 6:27 am
by bilvyy
I am trying to put a menu screen up (it's nothing complicated, just two actors and one mouse down event), which the player can view by hitting TAB. I have connected the menu to the view actor and have made it insivible, and am using this code to make the menu visible when the tab key is hit

Menu actor -> Key down (TAB) -> Script Editor
Code: Select all
EventDisable("tester", EVENTALL);  //Disable player controls
transp = 0;  //Set the menu to be visible


However, I just kind of picked it apart from a longer code made for something else entirely, so I don't really know what I'm doing with it, i.e. I don't know what code to use to make the menu invisible again when the player hits TAB to close it.

I basically just need the reverse of this code so I can close the menu after I've opened it.

I need an answer as quickly as possible, if you could! Thanks!

Re: Open and close a pause menu

PostPosted: Sun Aug 14, 2011 6:39 am
by skydereign
Well the exact reverse of that code is this.
Code: Select all
EventEnable("tester", EVENTALL);
transp = 1;

Re: Open and close a pause menu

PostPosted: Sun Aug 14, 2011 6:41 am
by bilvyy
Thank you! I'm a bit of a dummy with codes, but yeah that's working smoothly (: