Game lockup, problems with regions

Started by FortressCaulfield, Sun 07/07/2024 01:51:09

Previous topic - Next topic

FortressCaulfield

Sorry if this is a double post, forum seems to be eating posts rn.

1. Having a softlock if a room's rep exec starts playing a scene while I have my inv open. The scene plays up til this command: oPokeonstand.Animate(0, 1, eOnce, eBlock);

But why is rep execute doing anything with inv open though? I thought it paused the game?

2. It seems region scripts are postponed if the character moves onto/off the region as part of another script. So if I move her with KB or mouse it works fine, but if she walks off the region to talk to someone or move to a hotspot view point, the region script doesn't play til after the other script is called.

3. I seem to have mucked up the default text border gui and it only wants to be like 100 pixels. There doesn't seem to be a setting for its dimensions and the height scales fine based on the text. What am I missing?

Thanks in advance
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Khris

#1
1. It depends on the inventory GUI's visibility. For instance "Pause Game When Shown" pauses the game while it's visible, "Normal" doesn't.
The regular room_RepExec only runs while the game isn't paused, correct.


2. As described in my recent post about footsteps you can workaround blocking code not triggering region events.


AGA said the server is on its last legs, so it's a good idea to do Ctrl-A Ctrl-C before hitting the post button in case submitting the post fails.

Crimson Wizard

#2
Quote from: Khris on Sun 07/07/2024 12:29:511. It depends on the inventory GUI's visibility. For instance "Pause Game When Shown" pauses the game while it's visible, "Normal" doesn't.
The regular room_RepExec only runs while the game isn't paused, correct.

Sorry, this is wrong, and I found that this is a quite a common misconception, being a natural expectation (I had it too once).

This may seem strange, but room_RepExec DOES run if game is in "paused" mode set with PauseGame. PauseGame pauses only particular things in game.
I once amended documentation with the precise list, please refer to:
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html#pausegame

If you need to prevent a part of code from executing during pause, use IsGamePaused, for example:
Code: ags
function room_RepExec()
{
    if (IsGamePaused())
        return;
}

SMF spam blocked by CleanTalk