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

#1
I'm currently working on writing a verb coin GUI and I've run into some trouble. I want the verb coin to appear for inventory items, same as for hotspots. So, if you hold down the left mouse button it should appear after a little while. The problem is, that's not what happens.

I think I've narrowed it down to this segement of code, found in repeatedly_execute:

Code: ags

if (HasClicked && mouse.IsButtonDown(eMouseLeft))
{
  Display("TEST");
  if (ClickTimer < 10)
  {
    ClickTimer++;
  }
  else
  {
    gVerbCoin.X = ClickedX - 47;
    gVerbCoin.Y = ClickedY - 30;
    gVerbCoin.Visible = true;
    ClickTimer = 0;
  }
}
else if (HasClicked)
{
  Display("TEST2");
  ProcessClick(ClickedX, ClickedY, eModeWalkto);
  ClickTimer = 0;
  HasClicked = false;
}


If I hold down the left mouse button on a regular hotspot, this code first displays TEST and then TEST2, as would be expected since I released the button to click away the TEST message. However, when I hold down the left mouse button over an inventory item nothing happens until I release the button, at which point TEST2 is displayed.

This has me very confused. Since TEST2 is displayed, HasClicked must be true. And since TEST isn't displayed, mouse.IsButtonDown(eMouseLeft) must be false. If this is correct, why the delay until I release the button before displaying TEST2? If IsButtonDown is false, the script should have displayed TEST pretty much as soon as I had clicked on the item.

I'd be very grateful if someone could explain what's going on here and how I could fix it.
#2
Hi!

I've been doing a whole lot of dialog scripting lately and it's taking quite a bit of time. It feels pretty clunky and limiting compared to the scripting in the rest of AGS. Doing calls out to dialog_request in the global script is both more work than it should be and more confusing since you have to use numbers to identify different actions. It also spreads out the code, making it harder to get an overview of it.

So, my questions is: Am I missing something here? Is there some easier way of doing things?

If not here's my suggestion: Let the user choose dialog-script or normal scripting for every dialog option. That way you can have the ease of writing things in the dialog editor when you just want to do dialog without any fancy stuff and all the power of the normal way of scripting if you want it.
#3
Completed Game Announcements / Chez Apa
Mon 04/11/2002 17:27:32
L33T-Pete is tired of old nerdy life and has gone on a quest for coolness. And this is where you come in. Guide Pete through wacky adventures the likes of which have never been seen. Solve mind-boggling puzzles, get insulted by strange characters and wince at the bad jokes. In short, play Chez Apa.

http://www.gaspop.com/files/chezapainstaller.exe

Webspace provided by Chrille, who also made the music in the game.

Enjoy!

SMF spam blocked by CleanTalk