DexterMorgan Posted March 9, 2008 Share Posted March 9, 2008 Hi guys, I need a little help, Im making a game with a lot of levels and i was wondering if there is a way for autoit to make sure they beat level one before they go to level 2. (I am asking this because i have a level select screen it doesnt go to the next level itself.) (I have a level select screen because that is where you can enter cheats and stuff.) Thank you for all your help... code Link to comment Share on other sites More sharing options...
Aassdd Posted March 9, 2008 Share Posted March 9, 2008 Disable the controls and then enable them? GuiCtrlSetState($control, $SW_DISABLE) i think Link to comment Share on other sites More sharing options...
Swift Posted March 9, 2008 Share Posted March 9, 2008 (edited) You could use a variable, write to a ini when they pass it..and if they click level 2, when they have not passed level one, the ini will say: 1, and it will give them a message or whatever. when they pass level 1, write to the ini, saying: 2, and allow it to open lvl 2 Disable them with: GUICtrlSetState($Control, $GUI_DISABLE) Not SW Edited March 9, 2008 by Swift Link to comment Share on other sites More sharing options...
Tomb Posted March 9, 2008 Share Posted March 9, 2008 Hi guys, I need a little help, Im making a game with a lot of levels and i was wondering if there is a way for autoit to make sure they beat level one before they go to level 2. (I am asking this because i have a level select screen it doesnt go to the next level itself.) (I have a level select screen because that is where you can enter cheats and stuff.) Thank you for all your help...i imagine for different things you do in the level it could like add to a variable. for example one variable you have starts at 0. as you do pieces of the level, you can like add to the number. then just use if statements to see if the number is right. lets say each time you do part of the level, you add 1 to this number, and the number needs to be 20 to move on. when they try to move on to the next level, it can see if the number = 20. if it is not 20, you will not be able to proceed. so like you start with this variable $var = 0 each time part of the level is completed you can be like $var = $var + 1 when they try to move on to the next level, you can do this If $var = 20 Then _proceed() Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 9, 2008 Author Share Posted March 9, 2008 You could use a variable, write to a ini when they pass it..and if they click level 2, when they have not passed level one, the ini will say: 1, and it will give them a message or whatever. when they pass level 1, write to the ini, saying: 2, and allow it to open lvl 2Disable them with:GUICtrlSetState($Control, $GUI_DISABLE)Not SW Thank you both for the very fast reply... But one more question.......Uhhhh...... HOW DO YOU DO THAT??? LOLCan i have an example if possible Thank you code Link to comment Share on other sites More sharing options...
Tomb Posted March 9, 2008 Share Posted March 9, 2008 the first thing to do really is create the game engine. without it you have nothing. if you can develop a working game engine, then you can start adding levels and things Link to comment Share on other sites More sharing options...
Aassdd Posted March 9, 2008 Share Posted March 9, 2008 Addition to Swift's post: Also try to add a protection because if you have 1, 2, 3 they will just type a number and unlock any lvl. Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 9, 2008 Author Share Posted March 9, 2008 Thank you all i think i got it!!! (CANT WAIT TO RELEASE MY GAME!) code Link to comment Share on other sites More sharing options...
Tomb Posted March 9, 2008 Share Posted March 9, 2008 Thank you all i think i got it!!! (CANT WAIT TO RELEASE MY GAME!)good luck on it.mine is 4 months into development currently. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now