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

#1
Hey. I took a look at your code and fixed up a few things in repeatedly execute. You need to split up the checks for timer 1 and timer 2.

Code: ags

if (IsTimerExpired(1) == 1)  //Start lightning
{
  int light=Random(1);

  if (light==0) 
  {
    SetBackgroundFrame(1);
    SetTimer(2, Random(80));
  }
 
  else if (light==1) 
  {
    SetBackgroundFrame(2);
    SetTimer(2, Random(80));
  } 

}

if (IsTimerExpired(2) == 1) //Stop lightning
{
  SetBackgroundFrame(0);
  SetTimer(1, Random(200) + 200);
}


First if case: If the timer 1 is expired a lightning background frame is set and timer 2 is started with a random number between 0 and 80.

Second if case: If timer 2 is expired the background is changed back and timer 1 is once again started with a random number between 200 and 400. The process repeats.

You could do it with just one timer, but it's easier to see what's going on this way.

That should probably work.
#2
Hey! I got it to work! Took a bit more work than just making the GUI non clickable though. The problem with just doing that was that I needed to catch the clicks that were made on it to be able to do something with the inventory items that were being clicked on.

What I did was to make the GUI non clickable and then when the game has registered a click and the inventory is visible it makes it clickable again. That way I can check out if there was an inventory item under the mouse at the time of the click and set HasClicked and all that stuff. Then I just make it non clickable again and let the script in repeatedly execute do its work.

Kind of a weird way around it and I'm sure there's a more elegant way of doing it. But hey, it works and that's all that matters. Thanks for the help!
#3
Thanks for the help, but I really don't know what more info to give.

I know about both "handle inventory clicks in script" and eMouseLeftInv. I've got pretty much everything else working about the inventory except this. I can just simply click on the inventory item to use them as a selected item, which would lead down the TEST2 path in the code I posted. I can also right click to close the inventory or, if an item is selected, to uselect it. So the problem does not lie in the game not recognising my clicks.

eMouseLeftInv could be the culprit in this, but since you can't do something like "if (mouse.IsButtonDown(eMouseLeftInv))" I don't think that's it.

HasClicked, ClickedX and ClickedY are indeed set in on_mouse_click, but they're not really relevant to this, are they? Except for the fact that HasClicked is true, that is.
#4
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.
#5
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.
#6
Hints & Tips / Re:I need help on chez apa
Wed 31/12/2003 23:34:23
Subtle hint:
Spoiler
Sometimes the best course of action is to do nothing at all
[close]

Not-so-subtle hint:
Spoiler
Some of the things the parrot has to say aren't as random as they may seem. Some of them sound like drinks, don't they?
[close]

Solution:
Spoiler
Listen to the parrot until it starts repeating itself. Go out and ask the barman about the drinks. They cost 1, 2 and 3 dollars, and that's the combination: 123
[close]
#7
Hints & Tips / Re:NEED CHEZ APA WALKTHROUGHT
Thu 28/08/2003 14:03:41
Since so many people seem to be having trouble with my game I wrote up a little walkthrough. It contains no subtle hints or anything like that, just a straight walkthrough, so use it at your own risk.

http://www30.brinkster.com/halgwet/chezapawalkthrough.html
#8
Just thought I'd point out that Richard Cobbett also wrote that article with the pleurghburg review for pcgamer.
I've actually spoken a bit to him over at the pcgamer forums and he seems like a nice guy (Well, except for the fact that he thinks Gabriel Knight 3 is pure crap). A real adventure fan too.
#9
Hmm... that's a bit weird. I ran into that problem when I was testing the game, but I thought I had fixed it. It has something to do with the order in which you do things.
I'm sorry to say it, but you'll have to replay the game to fix this. But if you remember what to do up to that part, it shouldn't take too long. Try to do things in a different order though...

I'll look into it and try to find out exactly what it is that causing it.
#10
Hints & Tips / Re:chez apa HELP
Sat 15/02/2003 09:22:52
I'm guessing that you don't have what is neccessary to make a cue out of the sharpened broom:

Little clue:
Spoiler
Take a look at the back of the desk.
[close]

Larger clue:
Spoiler
Use the nose ring on the back of the desk to open it. Things should be pretty obvious from there on
[close]
#11
Completed Game Announcements / Re:Chez Apa
Wed 06/11/2002 19:39:40
Actually Snake, I think there's one particular item that he hasn't picked up yet. So Nostradamus, read this before you read what Snake wrote:

Spoiler
Try interacting with the street outside Chez Apa.
[close]
#12
Completed Game Announcements / Re:Chez Apa
Wed 06/11/2002 08:29:49
Wow! You're putting me in the same sentence as US senator, Phil Gramm! Oh, wait... you mean Phil Reed. I guess that's ok too...

Snake, at the moment I'm not planning on making this a series. In fact, I'm pretty damn tired of comedy right now. It's just so hard see what is funny and what is just purile nonsense. That's why I'm making a serious adventure next. But after that, who knows?
Spoiler
Haven't you ever played Full Throttle? (-: I'd suggest that you get touchy feely with the bartender
[close]

Monkeyman1138, who really should start using the spoiler tags:
Spoiler
Since you're asking that question, you should probably just remove the gum. Try to find a way to stop the door from locking when you distract the bouncer
[close]
#13
Completed Game Announcements / Re:Chez Apa
Mon 04/11/2002 23:36:35
MillsJROSS:
Spoiler
Those last three things that the parrot said. They sounded like drinks to me. Perhaps you should ask someone about them... I hope I'm not being too obvious (-:
[close]

Gonzo:
I have a project that I will begin work on now that Chez Apa is complete. It's a serious police adventure. I've been working on the story for quite some time now and I'm really looking forward to start working it. Might be a quite a while until it's released though...
#14
Completed Game Announcements / Re:Chez Apa
Mon 04/11/2002 21:31:51
Glad you like it, Gonzo.

Spoiler
How about having a closer look at the desk. You should probably spot something of interesting. And no, I don't mean the pencil sharpener (-:

Also, there's another thing in that room that you're bound to notice if you stick around a while.
[close]
#15
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