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

#2
As SayBackground is non-blocking, what's the best way to have two characters have a dialogue while the player walks around doing his thing?

Also, if I do a Say at the same time as a SayBackground is being displayed, it disappears...is there any way to avoid that?

The only approach I've found so far is manually setting timers/variables to trigger the "next" line of dialogue inside a room_RepExec. It's horribly tedious!

Like:
Code: ags

    if ( (IsTimerExpired(1) == 1 ) && ( scene2 == 2 ) ) {
      cPaul.SayBackground("What a dumb question.");
      SetTimer(2, 240);
      scene2 = 3;


#3
Thanks, both approaches work perfectly.
#4
It seems like camera.setat jumps to the target coordinates, but I'd like it to pan there (as seen in many games, maniac mansion comes to mind).

For example, player enters a room, then the camera pans to a different part of the room to focus on some action.

Any suggestions?
#5
Quote from: Khris on Thu 27/01/2022 08:39:56
I assume both characters are going to be walking around?

Basically. It's a car driving in a straight line driving towards the character when he crosses the road. As you said, it's a bit weird because the overlap in my first image really doesn't seem logical unless both characters are only judged by a single point, which is what I think fernewelten is saying.
#6
Well, I've changed one of the characters to an object instead, and now it works. It's not a graceful solution (I basically swap it for the character after the collision), but I can live with it.
#7
That post from fernewelten is where I got the part about "characters are represented by just the mid point of their baseline. Every character can walk anywhere so long as the mid point of their baseline stays within the walkable area."

As I mentioned I think that is my problem. I have two characters that I want to collide. In this image they are NOT colliding, though they completely overlap:
https://imgur.com/a/OUplzyO


Here they are just about to collide (the left box is moving directly to the right...can't seem to ctrl-a during the collision). https://imgur.com/a/6ioV6DH

I'm not sure I understand fernewelten's explanation fully (because... when they collide, their "mid point of the baseline" are not overlapping?).

Is there any other way to resolve this than hack one of my characters into an object? It does not have to be pixel perfect, I'm happy as long as the characters dont completely happily pass through each other.
#8
I'm trying to get two characters to collide, and it works, but it's not even close to accurate. I mean the blocking areas (which I've massively expanded with BlockingHeight/Width for both characters) will happily pass through each other (as seen with ctrl-a) without colliding most of the time, unless they are quite dead on.

Searching here I found something explaining that moving characters' collision area isn't really the entire blocking height/width area... or maybe I misunderstood that. Sounds weird.

Both characters ARE moving though - how can I best get them to collide if their sprites touch (even just vaguely accurately...)?

#9
That was the clue I needed. Somehow, almost all my sprites had disappeared...? No idea how that happened, but AGS did crash on me recently, who knows if that's related.
Anyway, I reimported all the missing sprites and all is well now. Thanks!
#10
I'd just put the finishing touches (an end screen) on my working game and suddenly it doesn't work at all.
It's supposed to load a first screen, where you click anywhere, which loads the actual game screen where the action begins. This was all working.

Now, after adding a 'game over' screen, somehow the cursor doesn't appear in the first screen, but a click still loads the next screen (the game), but it just crashes there. I'm not sure how to describe that better. It's giving no useful error and I can't really figure out what I changed that caused this.

Here's the error:
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00427EEA; program pointer is +3330, ACI version 3.5.1.14, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS Technical Forum.


The first screen is simply a png of the game's title with a hotspot the full size of the screen and a theme song - any click changes to the next room:
Code: ags
function room_AfterFadeIn()
{
  theme.Play();
}

function hHotspot1_AnyClick()
{
  cCrusher.ChangeRoom(1, 159, 1349);
}


The dump file is here in case it helps:  https://drive.google.com/file/d/1sAlvfsFN7uK4KHds1XSETxcPJrOPDcxH/view?usp=sharing
SMF spam blocked by CleanTalk