Quote from: Mandle on Sun 12/08/2018 00:35:42
and starting over so I'd just cheat.
This is not called cheat... it's called reloading your game.

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Mandle on Sun 12/08/2018 00:35:42
and starting over so I'd just cheat.
function on_event(EventType event, int data)
{
if (event = eEventRestoreGame)
{
if (SavedGameslot==998)
{
SavedGameslot=0; // I'm not sure that seting this to 0 is needed, but I had it on my code, so I'll leave it here.
// you can then read the info of your password setting and maybe display a message saying what level of censurship is the game now set to or what ever else you need to do
}
}
}
// create a Text box on your GUI... for this example I'll call it tbUnlock, but you can call it whatever you like. Then click the event button and create the new function.
function tbUnlock_OnActivate(GUIControl *control) // this is created automaticly when you click the ... button on the events for for GUI text box.
{
if (tbUnlock.Text == "Your Password")
{
isGameUnlocked = true; // This is a global variable of type bool set to false by default
tbUnlock.Text=""; // clears the input text
Display("Correct password. Enjoy your gory game!");
gPassword.Visible = false; // closes the GUI that you are using for the password entry
}
else
{
tbUnlock.Text=""; // clear text
Display("Wrong password!");
}
}
if (isGameUnlocked)
{
// Add your gory code her
}
else
{
// Add your censured code her
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.960 seconds with 15 queries.