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

#12761
Hello, I'm really stuck here.

My situation is the following:
When the mouse is over a hotspot (or obj or char), I made the cursor change to the appropriate MODE.
Additionally, I wanted to display the name of the hotspot next to the cursor.
I figured I could use a transparent GUI with one label and change the GUI's pos and label's text in the repeatedly_execute().
My first attempt though was to achieve this by using a TextOverlay which seems to be a more elegant way (at least in my opinion).

First I tried to store the Overlay's ID in an int I declared in line 2 of the global script (outside any function).
In game_start() I had
Ã,  id=CreateTextOverlay(0, 0, 100, 2, 1, "");
and in the global repeatedly_execute() I had
Ã,  SetTextOverlay(id, x+5, y+5, 100, 2, 1, line); (with x and y holding the mouse coords)

Then I tried another approach:
In game_start() I had
Ã,  int id;
Ã,  id=CreateTextOverlay(0, 0, 100, 2, 1, "");
Ã,  SetGlobalInt(9, id);
and in the global repeatedly_execute() I had
Ã,  int id;
Ã,  id=GetGlobalInt(9);
Ã,  SetTextOverlay(id, x+5, y+5, 100, 2, 1, line);

Both methods work fine as long as EGO stays in the first room.
But as soon as a new room is loaded, the game crashes with the following error message:
(room 4, script line 66) RemoveOverlay: Invalid Overlay ID passed
(line 66 of the global script holds the SetTextOverlay command)

(Perhaps I should add that I don't use the global repeatedly_execute(); I wrote my own called rep_ex() and call it in every room's repeatedly_execute() to disable the cursor's auto-change in rooms where I don't want it. But I believe it doesn't matter. And the global repeatedly_execute() is empty of course.)

I know this post is awfully long, but I wanted to be exact. Sorry :)

Please help, any hint is appreciated.
#12762
I just played your demo, it's great.

Beneath a Steel Sky (also by Revolution but much older than BS) uses this, too.

However, this method provides less flexibility.
You could still implement looking at things by right-clicking on them, but you can't any longer e.g. rob (interact with) another character.
This could be solved by opening a small GUI that lets you select whether you want to interact with or talk to the character. I think Lure of the Temptress uses this method.

My personal favourite of what I've seen so far in AGS games is Yahtzee's approach to the problem in 7 days a sceptic. (left-click: walking, right-click: GUI with choices opens)
#12763
Modules, Plugins & Tools / Re: Automatic doors
Thu 02/09/2004 22:50:27
I'm quite new here, but considering the door's animation, I have an idea:

Wouldn't it be possible to use two objects, one for the door and another for the wall the door slides into and then just move the door-object beneath the other one?
This way, the animation would require only two sprites and would be much smoother, right?
#12764
Hey,

this is my first post here, so don't kill me if I didn't obey one of the forum's rules...

A few days ago I wanted to play Perils of Poom (after I read a positive review).
I think it's a nice and funny game, however one thing is terrible: the intro can't be skipped. Most of the other games offer the opportunity to restore in the very beginning and only after starting a new game, the intro begins to roll.
I played a few other games, too, featuring this mistake(?).

What do you think? Am I right or what?Ã,  ???
SMF spam blocked by CleanTalk