Menu

Show posts

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 Menu

Messages - TDBFW1

#21
I've just realised something else I could try:
Code: ags

    if ((NotebookOpen) &&
  (IsKeyPressed(eKeyN)))
  {
    gNotebook.Visible=false;
    NotebookOpen=false;
  }
  if ((!NotebookOpen) &&
  (IsKeyPressed(eKeyN)))
  {
    gNotebook.Visible=true;
    NotebookOpen=true;
  }


However, the GUI won't close when "n" is pressed. The GUI pauses game when shown. Any help?
#22
I'm trying to open a GUI with the "n" button. Once the GUI is open, I want to be able to close the GUI with the "n" button again. However, if I try to do something like this:
Code: ags

if ((IsKeyPressed(eKeyN)) &&
(!GUIOpen))
{
gNotebook.Visible=true;
GUIOpen=true;
}
else if (GUIOpen)
{
gNotebook.Visible=false;
GUIOpen=false;
}
}


it doesn't work. How do I fix this and where do I put the code?
#23
Thank you so much. It works! Now I haven't lost hours of work. Seriously, thank you. :-D
#24
That's a good point. I think my antivirus may have broken the game file when trying to "clean" my PC.
Another point, my game file is greyed out in the debug folder. Is there any way to restore this or fix it?
#25
I can't move it out of OneDrive because it just tells me I need administrator access.
I'm using the latest version of AGS and it was fine for a month but now has stopped working for no apparent reason. I was working on a GUI and now it's broken...
#26
I get this error every time I try to start my game and I don't know why.
Unexpected error: Access to the path 'C:\Users\finnt\OneDrive\Documenten\Own Games\Les Saboteurs\_Debug\Les Saboteurs.exe' is denied.
I've tried accessing the _Debug file but it says I need administrator access.
Please help!

#27
Thanks, I understand now.
#28
So the bool variable "pink" will always be seen as true, and "!pink" is always false?
Sorry, I'm a beginner at programming. Thanks a lot for the other answers
#29
Sorry, I've slightly changed my mind on the concept. I will still be interested in the answer tho ;).
However, I've got a very similar query:
I'm using bool variables instead. I have three variables called pink, blue and green. If they are all false, I need to add 1 to failure each time. Is there a way to do this simply?
Also, if:
Code: ags

if ((boolvariable == true) &&
(pink == true)) failure += 1;

Will an else if following this code need to include the boolvariable again, or will it simply accept that boolvariable is true.
I.e.
Code: ags

else if ((boolvariable == true) &&
(green == true)) failure += 1;

or
Code: ags

else if (green == true) failure += 1;

#30
Thanks.
The reason why there is a failure variable is that there will be more than one counter, and each one of them will contribute to the failure variable.
Is there a way to do this?
#31
I I have a variable that equals 3, such as a counter.
I have another variable called failure, which if it reaches 3 will end the game.
For every point in the counter, the failure variable should increase by 1. Is there a simple way to do this, other than say;
Code: ags

if (counter == 1)
{
failure += 1;
}
if (counter == 2)
{
failure += 1;
}

etc.

#32
Thanks.
#33
Sorry, I'm an idiot. Problem solved.;)

However, I've stumbled upon another problem. My GUI has button in them, with are partially transparent (I.e. transparent circles in them). However, when the character is walking, the buttons become greyed out. Is there any way to turn this off?
#34
I'm trying to make a character walk somewhere but it doesn't seem to work.
Code: ags

int ran=Random(1);
if (ran == 0)
{
  player.Walk(60, 207, eNoBlock);
  player.FaceDirection(eDirectionDown, eBlock);
  aGrandfather_Clock_Wind_up.Play(eAudioPriorityLow, eOnce);
  aGrandfather_Clock.Play(eAudioPriorityLow, eRepeat);
  Display("Quickly press 'N' to record any actions of the staff.");
  Display("You've only got limited time.");
  SetTimer(1, 40);
}
else
{
  SetTimer(1, 1);
}
}


It just skips to the first line of dialogue.
#35
OK thanks. It didn't seem to be working before but I'll try again.
#36
Is there a way to let the game continue running but have a GUI open throughout?
SMF spam blocked by CleanTalk