News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[SOLVED] Pausing the game causes problems.

Started by Yona-TYT, April 08, 2017, 12:43:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

This should be the biggest bug that affects the tutorial. :o

Quote from: gauthier on April 02, 2017, 06:52:28 AM
That should be a bug unexpected feature report: coordinates change when rotating the map (that's already a major consistency problem in itself ! coordinates should be absolute, GPS coordinates of a point on Earth does not depend of the angle under which you are looking at the map.), and are not updated in the scenario description as long as the game is in pause (yes, I'm almost always in pause :p ).

Quote from: Yona-TYT on April 07, 2017, 03:08:43 AM
Quote from: gauthier on April 02, 2017, 06:52:28 AM

Chapter 3.G: Looks like the game wants me to create the convoy, but I could not build rails and stations where it was necessary. Major bug here.

Could not go further :(
I do not understand how to advance level without first building the rails that connect the two factories (something very strange is happening).

I suspect that pausing the game is causing problems (I think Prissi mentioned something about this).

- It causes the game to run very slowly.

- In some cases it causes level jumps (I still do not confirm it).

Is there any way to disable the "pause" ?.

Dwachs

If the game is paused also the script is paused. This might lead to problems with your script if it continuously checks user actions.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 08, 2017, 08:29:16 AM
If the game is paused also the script is paused. This might lead to problems with your script if it continuously checks user actions.
Scripts should not stop in my humble opinion.

Yona-TYT

@Dwachs
I would like to disable the pause option to prevent players from damaging the scenario.

Dwachs

Could not imagine that this is already possible:

function is_tool_allowed(pl, tool_id, wt)
{
if (tool_id == 0x2000) return false // prevent players toggling pause mode
return true
}
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

#5
I think it does not work with "DIALOG_GAMEINFO" (0x4028) ???

Edit.
How strange, I can only deactivate with this:

    local nr = 0x4019
    local result = true
    for(;nr<=0x4020;nr++){
        if (tool_id == nr)
            return false
    }
    return result


Yona-TYT

Quote from: Yona-TYT on April 11, 2017, 01:22:45 PM

How strange, I can only deactivate with this:

    local nr = 0x4019
    local result = true
    for(;nr<=0x4020;nr++){
        if (tool_id == nr)
            return false
    }
    return result



Should not this be a error?  ??? (Removing the "game info" button in pak128)

Dwachs

"DIALOG_GAMEINFO" is 0x401c (these are heaxadecimal numbers)
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 13, 2017, 08:29:41 AM
"DIALOG_GAMEINFO" is 0x401c (these are heaxadecimal numbers)
It works fine, thank you.