Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBaneTrapper

Posted 11 November 2012 - 06:10 AM

First of all, what kind of game is it, 2D or 3D?
case 2D: "Should check if the character is just near the ( Code entering device ) and/or if he is facing it too"
switch user to entering text mode, and allow him to go back from it, if he cant figure out the code.
In text entering mode, just populate a std::string with any key pressed.
if(MyEnteredCode >= 4)
{
    if(MyEnteredCode == TheCorrectCodeString)
    {
	    //Open the doors
    }
    else
    {
	    //Notify the user code is invalid
	    //Empty the string
    }
}
//Link to sdl TextInput tutorial they have.
http://wiki.libsdl.org/moin.cgi/Tutorials/TextInput
From LazyFoo tutorials i used to follow and it tought me well
http://lazyfoo.net/SDL_tutorials/lesson23/index.php

#2BaneTrapper

Posted 11 November 2012 - 06:10 AM

First of all, what kind of game is it, 2D or 3D?
case 2D: "Should check if the character is just near the ( Code entering device ) and/or if he is facing it too"
switch user to entering text mode, and allow him to go back from it, if he cant figure out the code.
In text entering mode, just populate a std::string with any key pressed.
if(MyEnteredCode >= 4)
{
    if(MyEnteredCode == TheCorrectCodeString)
    {
	    //Open the doors
    }
    else
    {
	    //Notify the user code is invalid
	    //Empty the string
    }
}
//Link to sdl TextInput tutorial they have.
http://wiki.libsdl.org/moin.cgi/Tutorials/TextInput
From LazyFoo tutorials i used to follow and it tought me well
http://lazyfoo.net/SDL_tutorials/lesson23/index.php

#1BaneTrapper

Posted 11 November 2012 - 06:10 AM

First of all, what kind of game is it, 2D or 3D?
"Should check if the character is just near the ( Code entering device ) and/or if he is facing it too"
switch user to entering text mode, and allow him to go back from it, if he cant figure out the code.
In text entering mode, just populate a std::string with any key pressed.
if(MyEnteredCode >= 4)
{
    if(MyEnteredCode == TheCorrectCodeString)
    {
	    //Open the doors
    }
    else
    {
	    //Notify the user code is invalid
	    //Empty the string
    }
}
//Link to sdl TextInput tutorial they have.
http://wiki.libsdl.org/moin.cgi/Tutorials/TextInput
From LazyFoo tutorials i used to follow and it tought me well
http://lazyfoo.net/SDL_tutorials/lesson23/index.php

PARTNERS