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

Topics - Atelier

#161
Hullo. Sorry for posting twice in the same day.
I've sorted out a list box GUI at the bottom of the screen that displays everything the player's done, such as looking at something or "You picked up X item." and such.

Anyway, I don't want it to display everything since they began playing, so I'm trying to find a way to delete the items at the top of the list box (the ones less recent) if the number of things registered reaches 25, for example. Here's the code I've come up with:

if (ListBox.ItemCount <25) {
   ListBox.RemoveItem(0);
}

I've bunged this under game_start like I do with most things. When I run the game, the yellow box thing comes up and points at the second line - which I've highlighted in blue - and says 'ListBoxRemove: invalid listindex specified.' I have a feeling I have to create a global variable, but what's wrong?

Thanks in advance.
#162
*Please read the last post for my new query.*

Hullo.

How would I go about adding a function into my game that can allow the player their own name? When they choose to start a new game, a text box appears and the player can give themselves a name, and that name is used throughout the game, such as displayed on the status bar or mentioned when they talk to people. I've got a feeling that % can help. Am I right?

Thanks  :)
#163
Hullo.

I was wondering how you would go about disabling all key presses in certain rooms. For example, my menu (Room 0) shows the GUIs when I press the keyboard shortcuts, but I don't want them to. Then, I want to enable all of the shortcuts again when the player enters the first room (Room 1). Any suggestions?
#164
Hullo.

I've been fiddling around trying to make a code to show and hide the icon bar when you press the space key. However, there seems to be a problem and I don't know what it is. I've located this code in the global script.

function on_key_press (eKeyCode keycode) {
  
   if ((keycode == eKeySpace) && gIconbar.Visible = false) {
      gIconbar.Visible = true;
}
  
   if ((keycode == eKeySpace && gIconbar.Visible = true) {
      gIconbar.Visible = false;
}

There. An error message comes up saying "Parse error in expr near 'gIconbar'" I think it may have something to do with brackets. What's wrong with what I've got?

Thanks in advance.
#165
Hullo. I've just tried to load up my game and there's a problem which won't let me. The main problem is 'root element missing'. There's also more detailed information, but it there something simple that I can do to get it running again?

                                                     *Since then, I have fixed this problem and will explain what I did for future users who search this problem!*

What you need to do is not panic first, because it can easily be fixed. Load up your documents and go into the file where all of your game's information is located (room files and such.) Then, after looking through you will find a BAK type file, named 'Game.ags.bak'. <-- May differ, I'm not sure. You have to double click on this. It will probably say there is no suitable program to load it, so choose the AGS Editor by browsing for it. Confirm this and open it up! Now, save the game and close it up.

You should now be able to open it with the normal editor. (Hopefully!) This worked for me and I hope it works for you! How was my first ever accidental advice?




#166
Beginners' Technical Questions / Speech Boxes
Sat 02/05/2009 14:45:31
Hullo.

I'd like to know what I would have to do to reposition speech so it doesn't appear above a character's head. If possible, could I display the speech in a GUI that runs along the bottom with an icon of the character's face beside?

Thank you in advance.
#167
'Othello's Travelling Circus' is about a clown called Presto who travels with a circus act. Presto can't wait to get back to his trailer after the last performance and get some sleep. But, as he arrives, he finds a note stuck to his door. Cookie the Cook, Presto's best friend, has got himself into a spot of bother, and has asked him for his help.

After trying to stamp out a rat problem in the kitchens, Cookie the careless oaf has accidently mixed the rat powder with the sugar. A simple mistake to make...   What's worse, Othello the circus-master likes to have a quick cuppa before he goes to bed. A quick cuppa with plenty of sugar. Eleven heaped tea spoons to be exact.

Presto must find a way to prevent Othello from drinking his tea. However, the circus-master is quick tempered and not to be trifled with, especially since the latest performance was riddled with mistakes. Presto has to be devious in parting Othello with his beloved cup of tea. It's your job to help him.







Thank you for looking at my thread. :) Please tell me what you think!
#168
Hullo. I would like to know how you stop items overlapping in your inventory. At the moment, when the player receives his second item, the two icons appear on top of each other and it makes it difficult to use the one on the bottom. (And it also doesn't look very nice).

Do I need to add a function giving the x and y co-ordinates?

Thank you for taking the time to read my query.
#169
Hullo. I have not been using AGS for long, and already I have encountered lots of problems.
The latest concerns if statements. Here's what I would like to do:

If the player has picked up iPockettranslator, then I would like hCScreen activated, which, on any click, would take him to a new room. But, if the character has not yet found iPockettranslator then I don't want anything to happen when they click on the hotspot.

Here's the scripting that I have constructed for it:

function_RoomLoad ()
{
   hCScreen.Enabled = false ;
}
if (player.HasInventory (iPockettranslator)) {
   hCScreen.Enabled = true;
}
else {
   hCScreen.Enabled = false;
}

I have looked through the forums and almost know the entry on the manual off by heart (knowing me, I've overlooked something simple), although I don't know what is stopping me from running the game. A message usually comes up saying (Parse error: Unexpected if). I have entered this sequence in the room which the hotspot is located in. Do I need to transfer it to the global script? Also, do the two terms (roomLoad + else) contradict each other?

Vaguely linked to this (I think/hope) is the word bool. What does it mean and is it important in if/else?

Thank you for taking the time to read my query.
SMF spam blocked by CleanTalk