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

#1
Beginners' Technical Questions / Dialog boxes
Thu 27/07/2023 21:37:51
Is there a very simple way to make dialog boxes appear at the bottom of the screen? All I want is the dialog box, with the character's name.

And, I'd like it so that the dialog doesn't run automatically... instead, the dialog only proceeds if the player clicks on the screen. Is that possible?
#2
Appreciate the advice. Thanks!
#3
Ah OKAY. Actually, I just did something dumb. The variable WAS trying to work, but I had written a different script earlier that was messing everything up. I forgot about it. I got rid of it, and everything's working now.
Thanks for all of your replies.
#4
I have only declared it in the global variables pane. I haven't used export, import, or anything like that. Should I?
#5
Currently, the Loop variable is supposed to change at the end of a dialog script.

Code: ags
// Dialog script file
@S  // Dialog startup entry point
  Display ("Some dialog...");
  Display ("Some dialog...");
  Display ("Some dialog...");
  Train.Play(); //sfx
  player.ChangeRoom(1); //player back to initial room
  Loop = Loop + 1; //change Loop to 2

As you can see I execute a few commands after the displays. The SFX, and room change work. The variable doesn't seem to. Then, in the script for Room 1, I try to check for the Loop value.

Code: ags
function cEcho_AnyClick()
{
  if (Loop ==1 ) //dialog L1
  {
dDialog1.Start();
  }
  else if (Loop == 2) //dialog L2
  {
cEcho.Say ("Test!");
  }
}

#6
I just use player.ChangeRoom(1):
#7
Hi again,
I'm making a game with a loop mechanic, and so I want to create a variable to track how many loops have occurred. I've defined 'Loop' as an integer in the global variables tab, with a default of 1.

In a dialog script, I've written: Loop = Loop + 1. I'm trying to increase this integer by 1.
Essentially, I want "Loop" to be at a value of 2. But stating "Loop = 2" didn't seem to work either.

After the variable change, the player is sent back to the beginning of the game. I've written this in the room script:

function cEcho_AnyClick()
{
  if (Loop == 1)
  {
dDialogL1.Start();
  }
  else if (Loop == 2)
  {
dDialogL2.Start();
  }
}

AGS lets me run it without error, but it doesn't do what I want. It only runs the first loop option and never accounts for the variable change. I'm not sure where my problem is. Any help would be greatly appreciated! :smiley:
#8
Hello, I'm new to AGS and working on my first project.
I want to have dialog boxes for each time a character speaks, with a custom appearance. I'd like a box to open at the bottom of the screen, displaying the character's name and their dialogue text. For appearance, I'd like the box's edges to be rounded (curved rectangle). Is it also possible to have different coloured boxes for different characters?

Any tips are much appreciated, ty!
SMF spam blocked by CleanTalk