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 - Amir

#41
Quote from: Crimson Wizard on Wed 22/06/2022 15:51:58
What about the original files, how does their volume compares to your music/sound files?

You're right. everything, not just speech volume. The volume of the speech audio files is a bit low, so it's more important to me.
#42
Hi,

I noticed that the speech volume in the game is lower than the audio files. I guess 20% lower. I tried SetSpeechVolume(255); but that didn't help.
Is there a trick to make the speech volume as loud as the audio file?

MP3 is the type of my audio files. Version 3.5.1.18.
#43
Ok  :)
#44


Challenge of the Tentacle is a free point and click escape room adventure fangame inspired by Maniac Mansion, Day of the Tentacle and Maniac Mansion Mania.

Story

On a beautiful morning with chirping birds and sunshine, it seems a new beautiful day begins for the whole world. But no one knows that a catastrophe could happen that day. An evil, tyrannical, purple tentacle wants to take over the world. On this seemingly wonderful morning, our well-known protagonist, Bernard, renowned physicist and chemist, wakes up muddled. He still doesn't know that on this day he has to prove that he is a genius and has not, like so many others, studied in vain. But he's starting to remember the Purple Tentacle's visit and their argument about world domination, which ended with a cup of tea, his heavy, drooping eyelids and Purple Tentacle's malicious grin.

He is locked in his bedroom with many puzzles provided by Purple Tentacle to challenge and prevent him.

Help Bernard to solve these challenging puzzles, because with each solved puzzle he gets a little closer to the key that opens the door and thus also to the means created in his laboratory with which he can save the world from conquest. Solve logical, amusing and motivating puzzles that challenge not only Bernard, but YOU as well.

Features

Inspired by Maniac Mansion, Day of the Tentacle and Maniac Mansion Mania.

Humorous game that combines point and click adventures with escape room tasks.

With many allusions to all adventures by LucasArts.

Various types of puzzles, from classic inventory usage to brain teasers.

You will find out the result of your performance at the end of the game: very good, good, satisfactory or bad.

And the best at the end: it costs nothing! It helps curb inflation!









It will be soon available on itch.io in english and german.

https://www.adventuregamestudio.co.uk/site/games/game/2621-challenge-of-the-tentacle/

Story: 100%
Scripting: 100%
Graphics: 100%
Puzzles: 100%
Sound/Music: 100%
Voice Acting: 100%

#45
Quotethe translation system thinks it is a different text and adds it separately to the TRS file. In fact, if you change even a single letter it will be considered a different line from now on.

I knew that, but I thought AGS can differentiate the &number from the other letters.

QuoteAlternatively, you could backup your trs, delete everything from the one in the project folder, tell to update, then you will have a clean trs to where you may then paste translations from backup correspondingly.

I'm afraid it will change the order. Now the order is the same. I can copy line by line and paste under the new ones, it's faster. I'll just delete the top old ones.
#46
Hi,
I have a question. My default language is German. I created English Translation then I put the English translation in English.trs, and then I put the German speech in script with &number. AGS has now created new lines for me with &number in the .trs and the English translation no longer appears.

Should I have inserted the German speech first and then the English translation?  :-X

Do I now have to insert the English translation again for the new sentences with &number? If yes, I will have 2 texts, one with &number and the old one without &number. Should I leave them all like that or delete some? I don't think they will cause problems if I leave them all, but should I delete the old texts without &number just to be safe?
#47
Quote from: Crimson Wizard on Sat 11/06/2022 20:10:32
Quote from: Amir on Sat 11/06/2022 15:27:37
They are already both unclickable.

Note that if gGuiLine is also unclickable, then " if (GUI.GetAtScreenXY(mouse.x, mouse.y) != gGuiLine)" won't work, as GUI.GetAtScreenXY only looks for clickable guis.

Yes, you're right. That's why it didn't work. I forgot that I made both Guis unclickable. No matter now. It works now after I restricted mouse activation. Thank u.
#48
I added if (mouse.x < 505) and it seems to be working now.

Code: ags

if (mouse.x < 505)
  {
  
  if ((object[0].Visible == true) || (object[3].Visible == true)) {}  // nicht malen
  
  else if (mouse_down && accept_input) 
  {
    accept_input = false;
    draw = true;
    sx = mouse.x;
    sy = mouse.y;
    ex = sx;
    ey = sy;
    spriteForLine = DynamicSprite.Create(Room.Width, Room.Height);
    gGuiLine.BackgroundGraphic = spriteForLine.Graphic;
  //draw line from the place where the mouse was pressed to the current position of the mouse
  } 
  else if (mouse_down && draw)
  { 
    DrawingSurface *surface = spriteForLine.GetDrawingSurface();
    // first erase old line by repainting it with a transparent color
    surface.DrawingColor = COLOR_TRANSPARENT;
    surface.DrawLine(sx, sy, ex, ey, LINE_WIDTH);
    ex = mouse.x;
    ey = mouse.y;
    surface.DrawingColor = line_color;
    surface.DrawLine(sx, sy, ex, ey, LINE_WIDTH);
    surface.Release();
    
  // if the mouse button is released and input set to false, reset accept_input and stop drawing lines
  } 
  else if (!mouse_down && !accept_input)
  {
    accept_input = true;
    draw = false;
    // paste resulting line onto the final sprite with many lines
    DrawingSurface *surface = spriteForAll.GetDrawingSurface();
    surface.DrawImage(0, 0, spriteForLine.Graphic);
    surface.Release();
    // don't display single-line sprite anymore
    gGuiLine.BackgroundGraphic = 0;
    spriteForLine.Delete();
         // save line
     Lines[line_count].sx = sx;
     Lines[line_count].sy = sy;
     Lines[line_count].ex = ex;
     Lines[line_count].ey = ey;
     line_count++; // increase line counter 
  }
  
  } 
#49
Quote from: Crimson Wizard on Sat 11/06/2022 14:02:34
Quote from: Amir on Sat 11/06/2022 13:12:18
Yes with if (GUI.GetAtScreenXY(mouse.x, mouse.y) != gGuiLine) return;// I can click on OK gui but not gGuiline, gGuiline is gone. That's good, but when I change ZOrder and put gGuiline behind the other and click on OK gui, wrong answer, like I said, like I'm drawing an invisible line outside of the gui and that's why it doesn't work.

That should not happen. What are zorder values of these guis?
There's also gGuiAllLines, it should perhaps be made non-clickable to not interfere with anything.

They are already both unclickable.

Code: ags

  gGuiLine.ZOrder = -100;
 gGuiAllLines.ZOrder = -100;
 
  gverbinden.ZOrder = 100;  // Ok button
 gReset.ZOrder = 100;    // Reset Button


Both Guis left 0 and width 540 and the button OK width 100 and left 700. I tried moving the Gui OK to the far right edge 1100 left but // wrong answer, as if it were inside the gGuiline.

Is it really only drawn in GUI and not outside?
#50
Yes with if (GUI.GetAtScreenXY(mouse.x, mouse.y) != gGuiLine) return;// I can click on OK gui but not gGuiline, gGuiline is gone. That's good, but when I change ZOrder and put gGuiline behind the other and click on OK gui, wrong answer, like I said, like I'm drawing an invisible line outside of the gui and that's why it doesn't work.
#51
QuoteThe solution may be to either restrict drawing to certain coordinates, or coordinates of gui that you put sprites on, if you make it not cover whole screen but only area where it is allowed to draw.

It's not on the whole screen, otherwise the buttons would not be clickable. It's there where the hotspots are. But apparently it still draws invisible lines outside the gui.

Quoteuse ZOrder to put gGuiLine below other controls and test GUI.GetAtScreenXY to see if the mouse is above it before starting to draw.

Ok, i'll test it.
#52
Quote from: Crimson Wizard on Sat 11/06/2022 01:34:54
Quote from: Amir on Sat 11/06/2022 00:49:40I want to make it so that if you click the OK button and haven't dragged anything yet, nothing happens. I mean if there are no lines there nothing happens when you click OK.

I think it might work if you simply move the "line_count" check up and merge with "if (event == 2)":
Code: ags
if (event == 2 && line_count > 0)

as if there are no lines drawn, then no need to also call TestLines and other things.

Good morning, it doesn't work, I've tried many things, like this for example.
Code: ags

  else if (event == 2) // lines ok
  {
  // test all lines and save bools
    TestLines();
    // now final test(s)
  if (line_count == 0) {} // do nothing

  else if ((line_count > 0) && (VBaer == true) && (Grim == true) && (Fenster == true) && (Vase == true))
  {
    // Bingo
  }  
  else
{
 // wrong answer
}    
  }


The result is wrong answer. Something doesn't let it be. The loop? for (int i = 0; i < line_count; i++)

Edit: I'll try to do it with gverbinden.Clickable = false; That is the Gui of the OK button.
#53
Quote from: Crimson Wizard on Fri 10/06/2022 20:56:08
Quote from: Amir on Fri 10/06/2022 20:39:33
Aha this TestLines(); function probably makes a big difference but it doesn't work for me  ???
I have to import the 2 new functions, right?

It's not only 2 new functions, there are other differences, compared to the last code you posted above. I guess you could compare the code side by side to see what is different. Or simply paste full code over, and then adjust to your needs.

Please forgive me, I have one last question since you have the code. I want to make it so that if you click the OK button and haven't dragged anything yet, nothing happens. I mean if there are no lines there nothing happens when you click OK. It doesn't work like that

Code: ags

else if (event == 2) // lines ok
  {
  // test all lines and save bools
    TestLines();
    // now final test(s)
    
   if ((line_count == 0) && (VBaer == false) && (Grim == false) && (Fenster == false) && (Vase == false))
    {}  // do nothing
    
   else if ((VBaer == true) && (Grim == true) && (Fenster == true) && (Vase == true))
   {
     // Bingo
     
   } 
   
  else
{
 // wrong answer
}

#54
Quote from: Crimson Wizard on Fri 10/06/2022 20:56:08
Quote from: Amir on Fri 10/06/2022 20:39:33
Aha this TestLines(); function probably makes a big difference but it doesn't work for me  ???
I have to import the 2 new functions, right?

It's not only 2 new functions, there are other differences, compared to the last code you posted above. I guess you could compare the code side by side to see what is different. Or simply paste full code over, and then adjust to your needs.

Yes it works now. Thank u so much.  ;-D
#55
Aha this TestLines(); function probably makes a big difference but it doesn't work for me  ???
I have to import the 2 new functions, right?
#56
Yes, I completely understand the logic. But don't ask me why I didn't save the line coordinates after drawing them. I didn't think of that  :-\  I don't have your experience  :) moreover the code is not a simple code. but yes, now it looks a lot more logical. But... it still doesn't work. Now my wish of my life is to see him say this F. Bingo.

QuoteActually,.... if you are using Lines array, then you should not be checking hotspots in RepExec. Or, if you check hotspots in RepExec, then you do not need Lines array at all.

There are 2 approaches:
1) Save Lines array in rep exec. Test both the line results and final results after button is pressed (in on_call).
2) Don't use Lines array at all. Test line results in rep exec and save booleans (VBaer and others) there. Then test these booleans in on_call.

Is that correct after u saw the error in the code?

I think without the Lines array will not work.
#57
Quote from: Crimson Wizard on Fri 10/06/2022 17:38:39
Actually,.... if you are using Lines array, then you should not be checking hotspots in RepExec. Or, if you check hotspots in RepExec, then you do not need Lines array at all.

There are 2 approaches:
1) Save Lines array in rep exec. Test both the line results and final results after button is pressed (in on_call).
2) Don't use Lines array at all. Test line results in rep exec and save booleans (VBaer and others) there. Then test these booleans in on_call.


Ok, all right.
#58
Quote from: Crimson Wizard on Fri 10/06/2022 17:18:14
Quote from: Amir on Fri 10/06/2022 12:19:19
Ok,

in room_RepExec (under the code of drawing)


What else is in room_RepExec? how do you fill Lines array?

No nothing, Lines array just like you wrote me. I didn't change anything. Take a look please, there is everything. It's not much in this room.

Code: ags


struct Line {
    int sx,sy,ex,ey;
};
 
#define MAX_LINES 100
Line Lines[MAX_LINES];

int line_count;

bool accept_input = true;
bool draw = false;
int LINE_WIDTH = 5;
int sx, sy, ex, ey;
DynamicSprite *spriteForLine;
DynamicSprite *spriteForAll;
int line_color = 53248;

function room_Load()
{
hotspot[1].Enabled = false;  
hotspot[2].Enabled = false;  
hotspot[3].Enabled = false;  
hotspot[4].Enabled = false; 
  
gSchliessen.Visible = true;
gSchliessen.SetPosition(1140, 16);


 gInventoryBar.Visible = false;
 gInventoryBar.Transparency = 100;
 
 if (Game.TranslationFilename == "English") object[1].Visible = true;
 
 gverbinden.Visible = true;
 gReset.Visible = true;
 
  spriteForAll = DynamicSprite.Create(Room.Width, Room.Height);
  gGuiAllLines.BackgroundGraphic = spriteForAll.Graphic;
 
 gGuiLine.Visible = true;
 gGuiAllLines.Visible = true;
}


/*
function on_call (int event) 
{
  
  if (event == 1) // lines reset
  {
       if (spriteForLine) {
       spriteForLine.Delete();
     }
 
     DrawingSurface *surface = spriteForAll.GetDrawingSurface();
     surface.Clear();
     surface.Release();  
    
  }
  else if (event == 2) // lines ok
  {
   if (VBaer == true) cBerny.SayBubble("Bingo"); 
     
  }
}
*/

function on_call (int LinesOK) 
{

if (LinesOK == 2)
{
if (VBaer == true) cBerny.SayBubble("Bingo");
}

}


function room_Leave()
{
  
  if (spriteForLine) {
    spriteForLine.Delete();
  }
  if (spriteForAll) {
    spriteForAll.Delete();
  }
 
 gGuiLine.Visible = false;
 gGuiAllLines.Visible = false;
 
  
}


function room_RepExec()
{ 
  
  bool mouse_down = Mouse.IsButtonDown(eMouseLeft);
  //if the left mouse button is down and the game accepts input, 
  //store x and y of the current mouse position
  if (mouse_down && accept_input)
  {
    accept_input = false;
    draw = true;
    sx = mouse.x;
    sy = mouse.y;
    ex = sx;
    ey = sy;
    spriteForLine = DynamicSprite.Create(Room.Width, Room.Height);
    gGuiLine.BackgroundGraphic = spriteForLine.Graphic;
  //draw line from the place where the mouse was pressed to the current position of the mouse
  } 
  else if (mouse_down && draw)
  { 
    DrawingSurface *surface = spriteForLine.GetDrawingSurface();
    // first erase old line by repainting it with a transparent color
    surface.DrawingColor = COLOR_TRANSPARENT;
    surface.DrawLine(sx, sy, ex, ey, LINE_WIDTH);
    ex = mouse.x;
    ey = mouse.y;
    surface.DrawingColor = line_color;
    surface.DrawLine(sx, sy, ex, ey, LINE_WIDTH);
    surface.Release();
  // if the mouse button is released and input set to false, reset accept_input and stop drawing lines
  } 
  else if (!mouse_down && !accept_input)
  {
    accept_input = true;
    draw = false;
    // paste resulting line onto the final sprite with many lines
    DrawingSurface *surface = spriteForAll.GetDrawingSurface();
    surface.DrawImage(0, 0, spriteForLine.Graphic);
    surface.Release();
    // don't display single-line sprite anymore
    gGuiLine.BackgroundGraphic = 0;
    spriteForLine.Delete();
    
  }
  
  
  /////////
  
 
 for (int i = 0; i < line_count; i++)
 {
        // test Lines[i] values:
      
     if ((Hotspot.GetAtScreenXY(Lines[i].sx, Lines[i].sy) == hotspot[1]) && (Hotspot.GetAtScreenXY(Lines[i].ex, Lines[i].ey) == hotspot[2]))
          VBaer = true;
       
     //else if ((Hotspot.GetAtScreenXY((Lines[i].sx, Lines[i].sy) == hotspot[3]) && (Hotspot.GetAtScreenXY(Lines[i].ex, Lines[i].ey) == hotspot[4]))
         // ColaHotdog = true;
  }
 
  
}


#59
Ok,

in room_RepExec (under the code of drawing)

Code: ags

for (int i = 0; i < line_count; i++)
 {
        // test Lines[i] values:
     if ((Hotspot.GetAtScreenXY(Lines[i].sx, Lines[i].sy) == hotspot[1]) && (Hotspot.GetAtScreenXY(Lines[i].ex, Lines[i].ey) == hotspot[2]))
          VBaer = true;
     //else if ((Hotspot.GetAtScreenXY((Lines[i].sx, Lines[i].sy) == hotspot[3]) && (Hotspot.GetAtScreenXY(Lines[i].ex, Lines[i].ey) == hotspot[4]))
         // ColaHotdog = true;
  }


Button

Code: ags

function on_call (int LinesOK) 
{

if (LinesOK == 2)
{
if (VBaer == true) cBerny.SayBubble("Bingo");
}
}


Global

Code: ags


function Button58_OnClick(GUIControl *control, MouseButton button)
{
if (cBerny.Room == 19)  // OK button
CallRoomScript(2);
}
#60
It doesn't work  :-\ Maybe something else is missing?

I'm trying with just one line and bool. AnchorBoat = true;

I don't think it makes any difference.
Code: ags

//hotspot[1].Enabled = false;  
//hotspot[2].Enabled = false; 
SMF spam blocked by CleanTalk