Open and close a pause menu - Fix'd

Non-platform specific questions.

Open and close a pause menu - Fix'd

Postby bilvyy » Sun Aug 14, 2011 6:27 am

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!
Last edited by bilvyy on Sun Aug 14, 2011 6:41 am, edited 1 time in total.
bilvyy
 
Posts: 23
Joined: Wed Feb 16, 2011 2:04 am
Score: 0 Give a positive score

Re: Open and close a pause menu

Postby skydereign » Sun Aug 14, 2011 6:39 am

Well the exact reverse of that code is this.
Code: Select all
EventEnable("tester", EVENTALL);
transp = 1;
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Open and close a pause menu

Postby bilvyy » Sun Aug 14, 2011 6:41 am

Thank you! I'm a bit of a dummy with codes, but yeah that's working smoothly (:
bilvyy
 
Posts: 23
Joined: Wed Feb 16, 2011 2:04 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest