I've got 99 problems

Started by Secret Fawful, Fri 15/02/2013 06:58:14

Previous topic - Next topic

Secret Fawful

Actually, I only have a few. I've basically had to just swallow my pride and come ask, because I can't seem to fix anything, and these issues have been plaguing me for a month or two now.

For starters, a music issue. Whenever I enter my eighth room, the music that is set to play in that room starts for a few seconds then stops. No other music will play in this room, and no music will play for subsequent rooms, until I get to the world map, which is several rooms later. I can't not find any code that is shutting the music off or interfering, and I have no clue what is going on.

Then there is the problem of the world map. I wanted to set it to where any click on the hotspots will make your character walk there and then change to that new room. However, all he will do is walk there, and any click does not actually do what I want it to do.

Third, I'm trying to get a character to try to punch another character, and then have that character dodge immediately. I have both animations, but I'm playing them separately. Unfortunately, this is not working out how I wanted it to. Should I make it one big animation instead of two separate ones, or can two separate ones work this way?

MiteWiseacreLives!

I recently was trying to do something similar to you with a map.
The way I got it to work was by forgeting any click. I made the destination a hotspot and set the walk-to point in the driveway or whatever, on that point create a region. Then perform the room change whenever player walks onto region.
The anyclick wasn't working the way I hoped, this worked perfect for me.. maybe you too.

Khris

Regarding the map, I think that eModeWalkto is the only mode that doesn't trigger the "any click on" event.
So what happens is that your click is processed as a simple walking command, and the hotspot being there is completely ignored.

If you want the walking around the map to be non-blocking, use regions, like Mite suggested. Otherwise you can switch the cursor to eModeInteract and use that.

About the two animations, you didn't say this but I assume you want the second one to start during the first one?
Animate the first character using eNoBlock, then use a Wait(...) to block the game for some time, then call the second animation.

I don't know about the music issue, have you confirmed that the music is stopped by AGS, as opposed to the Volume dropping, or the music file being broken?

Crimson Wizard

Quote from: Khris on Fri 15/02/2013 11:23:59
About the two animations, you didn't say this but I assume you want the second one to start during the first one?
Animate the first character using eNoBlock, then use a Wait(...) to block the game for some time, then call the second animation.

Also, you may sync by frames:
Code: ags

char1.Animate(..., eNoBlock);
while (char1.Frame != 5) // delay, while frame 5 is not displayed
{
   Wait(1);
}
char2.Animate(...)

Secret Fawful

Quote from: Khris on Fri 15/02/2013 11:23:59

I don't know about the music issue, have you confirmed that the music is stopped by AGS, as opposed to the Volume dropping, or the music file being broken?
The music will play in AGS' audio editor. It literally plays one-two seconds then just stops. I'm not sure if it's AGS or the volume dropping, but if so, then I don't get why music is working in other rooms.

SMF spam blocked by CleanTalk