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 - Crimson Wizard

#2761
Advanced Technical Forum / Re: Block scrolling
Wed 03/08/2022 13:56:44
"ViewportX" in the above code is likely a global variable that you were supposed to create yourself.

On another hand, "SetViewport" is an old function that was replaced by Game.Camera.
Speaking of which, the manual now has a table of deprecated functions, which also mentions contemporary replacements:
https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html
#2762
There are at least two kinds of "mangled names" in the engine; first refers to the engine API (like the "Button::Animate" you mentioned), and uses "^" symbol to divide name and number of parameters. This may be seen in SystemImports::get_index_of:
https://github.com/adventuregamestudio/ags/blob/7946be9e75a0edda6fc9d955ea771f60f9b8e968/Engine/script/systemimports.cpp#L83-L107

In CallScriptFunction there is a second kind of "mangled name", which uses "$" symbol to divide name and number of parameters. The CallScriptFunction is used to call functions defined right in the game script. So why does it need these mangled names there - it's is a question, and I don't remember an answer. This code was probably not touched in years.

In SystemImports we use std::map to speed up search. Here in CallScriptFunction, I guess, this linear search may be replaced with a hash map where you do two lookups instead of one (first with "mangled" and second with regular name).

As a random thought, there's also a hash multimap which can store several items by the same key. The key could be the function name, and the values could contain a struct with parameter numbers and actual data. So first you get this group of items by a key, then iterate through that small group to find matching parameter number. (if I understand its behavior correctly)

It will be curious to compare a difference in perfomance if one of the above changes is made.

But, of course, it has to be clarified why engine needs this in the CallScriptFunction at all.
#2763
Quote from: js on Tue 02/08/2022 10:40:57
Should i restart from a « blank » template (just copying keyboard script), or can i just remove elements ?
Will they still be embedded (so, take precious bytes, even if it's probably not so much) in the data exported ?

Template is merely a collection of starting assets, everything may be edited, replaced or removed. So choose the way according to what seems more convenient.

Note that if you delete some game objects, like GUI, you will likely have to also fix scripts that reference them (maybe by deleting parts of the script).

Another note: the contextual click interface sounds more like a BASS template.
#2764
Quote from: Mintaro on Mon 01/08/2022 23:09:31
I know writing to a text file is also an option, but that would then leave my variables open to being modified by the user, which isn't ideal either.

The common way to do this is to write a binary file instead, using File.WriteInt / ReadInt (or RawInt/RawChar) functions. Technically these may also be modified if someone figures out data format, of course, but so are saves and everything else.

https://adventuregamestudio.github.io/ags-manual/File.html
#2765
The fix is included in 3.5.1 patch 13:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=60128.0

(and the latest 3.6.0 beta update)
#2766
AGS 3.5.1 - Patch 13
Full release number: 3.5.1.20


For Editor
Spoiler

For Android
Spoiler

For Engine/Editor developers
Spoiler

Released: 1st August 2022

Previous stable version: AGS 3.5.0 P10 forum thread


This release is brought to you by:

- Alan v. Drake
- Crimson Wizard
- eri0o
- fernewelten (fixes)
- James Duong (implemented "--console-attach" option for Windows)
- Morgan Willcock
- Nick Sonneveld
- rofl0r
- Pablo Navarro (fixes)
- Thierry Crozat (bug fixing)
- vga256 (bug fixing)



Summary

3.5.1 is a minor update after 3.5.0, which contains mostly utility additions, fixes and perfomance improvements.

Changes in the Patch 13:

Engine:
- Fixed room object does not update its texture if it had a dynamic sprite assigned to it, and that sprite was unassigned, modified or recreated with same ID, and then reassigned again, - all within the same game frame.
- Fixed normal font renderer is not reinitialized correctly in the engine if a plugin uses IAGSEngine::ReplaceFontRenderer(), passing original renderer's pointer (which it received from the previous ReplaceFontRenderer call).


Changes in the Patch 12:

Engine:
- Fixed GUI textual controls don't redraw when the game translation changes until player clicks on GUI (regression since previous 3.5.1 updates).
- Fixed multitasking mode persisting if the game was switched from windowed to fullscreen mode (even though it's not supposed to work in fullscreen).


Changes in the Patch 11:

Editor:
- Fixed batch sprite export with "Set exported file as sprite source" option was assigning new source paths without file extension.

Engine:
- Perfomance fix: GUIs changing Transparency or Visible state should not redraw their surface.

Compatibility:
- Allow AudioClip.Play to to place clips on a crossfade channel, which is normally unaccessible from script. This prevents errors in some games that relied on this behavior.


Changes in the Patch 10:

Engine:
- Fixed crash when visible viewport does not have any linked camera.
- Fixed ListBox.FillSaveGameList() may include save slots with negative slot number (e.g. when the save file has "*.-01" extension).
- Fixed potential crash after failed RunAGSGame() call.
- Fixed search for the game data by GUID when restoring a save belonging to another game;
   this was implemented in 3.5.1, but appeared to not work correctly.


Changes in the Patch 9:

Editor:
- Removed restriction on max dialog topics in the project. The dialog limit in the engine was removed in 3.4.1, but remained in the Editor by oversight.
- Fixed Audio Clip items in the project tree not displaying their IDs right after being renamed.

Compiler:
- Fixed crash occuring when compiler tries to report "Already referenced name as import" error.

Engine:
- Added "--translation" and "--no-translation" command-line arguments.


Changes in the Patch 8:

Engine:
- Clearer error messages for Get/SetProperty functions.
- Fixed PlayFlic() command fails to start the video (regression in 3.5.1).
- Fixed DrawingSurface.DrawSurface() not applying transparency parameter correctly if the drawn surface has alpha channel.
- Fixed @OVERHOTSPOT@ is not updated immediately when character's name changes while cursor is above that character.

Templates:
- In BASS template fixed right click not dropping currently selected item if cursor was hovering over another item.


Changes in the Patch 7:

Editor:
- Added "Layout -> Reset to Defaults" menu command.
- Editor will now reset panel layout to default state if loading layout fail for any reason.
- Default config is now saved also when the game is run in debug mode (F5). This ensures that the test run is using the latest Default Setup, if the user's config has not been created yet.
- Editor will now display an error if user tried to reserve too many channels for audio types.
- Fixed Editor failing to start if user preferences file is corrupted.
- Fixed "Use old-style custom dialog options API" was not set when importing pre-3.4.0 projects.
- Fixed comboboxes' drop-down arrows were not painted with the right color from a color theme.

Engine:
- Fixed program crash occuring if the game reserved too many channels for audio types.
- Fixed potential crash occuring when player loads a save made in a multi-frame room, but the room was since edited and no longer has as many frames.
- Fixed character may have incorrect Frame (property) values while turning.


Changes in the Patch 6:

Editor:
- Added line numbers in the dialog script editor.
- Fixed Dialog script loosing changes if the pane is closed or redocked.
- Fixed controls arrangement on the Dialog pane getting broken when it's redocked.

Engine:
- Fixed filepaths in scripts that have backslashes ('\') fail on non-Windows systems.
   All the (script) File functions will now convert backslashes in filepaths into forward slashes for compatibility.
- Fixed engine was still creating standard directories for game saves and data, even if user provided the custom paths for these.
- Fixed TextBox control crashing the game if it's empty and player presses Backspace.
- Fixed controls on a fully transparent GUI were not interactive (this is an original AGS behavior, which was unintentionally changed in 3.5.0 by mistake).

Compatibility:
- When running 3.5.0 games, treat fully transparent GUI as non-interactable.
   In AGS transparent GUIs may be still interacted with, but 3.5.0 introduced an unintentional (and undocumented) change to this, which was reverted in 3.5.1.

Android:
- Support global engine's config file when the game is run from the Launcher: it's located in the AGS games' parent directory, same place where android.cfg is.

WinSetup:
- Added "Custom game shared data path" to complement "Custom save path" option.


Changes in the Patch 5:

Contained no changes and was a formal re-release with only fixed program build instructions for Linux.


Changes in the Patch 4:

Editor:
- Fixed swapping of inventory item's numeric ID could lead to errors.
- Fixed crash when importing pre-3.* games with multiple script modules.
- Renamed "Enforce object-based scripting" setting to "Enforce post-2.62 scripting". This is for clarity.

Compiler:
- Fixed potential memory corruption when user script reaches max nested if/else blocks.

Engine:
- Also tell module name and approximate source line when reporting script import errors for the variables and local functions.


Changes in the Patch 3:

Editor:
- Fixed sprite file over 2 GB could not be loaded (regression since the last patch).

Engine:
- Further improvement to GUI perfomance: don't redraw GUI when the mouse cursor is hovering over or interacting with controls not leading to an actual visual change.
- Fixed ListBox items could become unaccessible if its font or height is changed leading to a disabled scrollbar.


Changes in the Patch 2:

Engine:
- Fixed speech lipsync getting disabled after loading another game with RunAGSGame().
- Fixed MOD/XM clips fail to play (regression).
- Fixed certain OGV videos fail to play (regression).
- Fixed software renderer was not updating game screen correctly when running a game with legacy "letterboxed" feature (regression).


Changes in the Patch 1:

Editor:
- Fixed script compiler sometimes was not specifying actual Dialog number when reporting errors in the dialog scripts.

Engine:
- Fixed Game.TranslationFilename always returning empty string (regression).
- Fixed GUI controls which were toggled from disabled to enabled state not responding to the mouse clicks until the mouse is moved (regression).
- Fixed OpenGL did not apply a Linear filter when "Render sprites in screen resolution" option is off.


What is new in 3.5.1

Editor:
- Added "Attach game data to exe" option to General Settings. This lets you to package game data separately from the game.exe (only important on Windows at the moment).
- Deprecated "Limit display mode to 16-bit" property in Runtime Setup as it's no longer used by the engine.
- Display aspect ratio in game resolution dialog.
- Implemented classic Color Picker dialog for the Color type values in the property grid, instead of the default one which does not allow user-defined colors.
- Improved tab switching performance for script windows.
- Editor will now enforce full game rebuild after upgrading an older project, this ensures that all scripts are recompiled with the new version rules.
- Fixed room lists in property editor were not updated after room number is changed.
- Fixed importing pre-3.* projects broken by incorrect assignment of "Game file name" property.
- Fixed importing Characters and GUI without sprites still created empty sprite folders.
- Fixed crash when exporting/importing Characters with no Normal View.
- Fixed translation compiler did not correctly save some of the escaped sequences, such as "\n".

Scripting:
- Implemented correct parsing of a "const string" function return type.
- Fixed implementing imported functions was forbidden in the room scripts.

Script API:
- Added GUI.Shown readonly property that tells whether GUI is active on screen. This is primarily for GUIs with "Popup At Y" style, because they hide themselves regardless of Visible property. Note that since 3.5.0 GUI.Visible only tells a script-set value.
- File.Open() now supports $CONFIGFILE$ tag which will try to open user config file for reading or writing regardless of where config is located on disk.
- Added System.SaveConfigToFile() which writes current engine settings to the user config file. Only the options that can be changed at runtime are written back at the moment.
- GetTranslation() now returns "const string" (was "string"). This is to prevent modifying returned string using old-style string functions, such as StrCat(), as this string may be allocated in the internal engine memory for its own use.

Engine:
- Support loading audio and video from data packages larger than 2 GB.
- Improved game data loading times by introducing buffered file stream. Initial tests showed 3-4 times faster file reading.
- Improved game perfomance by not reupdating all of the GUIs each time anything changes, instead only affected GUI will be updated each time.
- Some improvement to general script perfomance.
- Some improvement to script Dictionary and Set types perfomance.
- Room Object's Graphic property now can be assigned a sprite with index over 32767 and up to 65535. This restriction is due to internal data format, which cannot be fully fixed without breaking compatibility with plugin API. This may still be worked around by assigning a View, as View's frames may contain sprites of any index available.
- Similarily, Object's View, Loop and Frame can now be assigned a value over 32767 and up to 65535; not that this was ever an issue...
- Removed arbitrary limit of 1000000 dynamic array elements (now supports over 2 billion).
- Dialogs with no enabled options left will be now stopped, instead of raising script error.
- Engine will not longer quit the game when failing to write a save, but simply display an error on screen (...why this was a thing in the first place?!).
- When restoring a save engine will now try to match game pack by GUID rather than using exe/pack name. This resolves potential problems when game package may have different name in distribution to another system. Also makes saves in multi-game collections more reliable.
- In Debug game mode allow to toggle infinite FPS mode (prior it could not be turned off).
- Expanded text parser error messages for easier debugging.
- Adjusted all the command-line options to have consistent prefix convention, where all full-name options must be preceded by double-dash, and one-letter options by single dash.
- Added "--localuserconf" command and similar global config option which tells engine to read and write user config in the game's directory rather than using standard platform path. Game dir must be writeable for this to work.
- Added "--conf" command which forces engine to read only explicit config file on startup.
- Added "--user-data-dir" and "--shared-data-dir" commands for setting save game directory and shared app data directory from command line (this corresponds to existing options in config).
- Fully configurable log output (in both game config and command line) allows to set up which message types and groups are printed by which output methods (sinks), including: file, system console, in-game console. "warnings.log" is now created only if file log was not requested by user.
- Added "--log-" set of command line options for setting up log output.
- Added "--tell-filepath" option for printing known engine's and game's file locations.
- Added "--tell-gameproperties" option for printing some of the game's general settings.
More information on log config and --tell commands currently may be found in following text file: OPTIONS.md
This has to be added to the manual eventually.
- Support proper lookup for Allegro 4 library resources (such as its own config and digital MIDI patches) in the game directory.
- Engine will no longer precreate directories for common files: saves, user config, shared files and so forth, - before actually having to write these. This ensures that no new directories are created on your disk without actual need. Also this fixed a problem that could happen if someone deleted e.g. a game's save directory while game was running.
- Fixed running game from another directory by passing its relative filename as command-line argument: in this case engine was incorrectly using its own directory to search for external game data, opening files for reading by script command, and so on.
- Fixed some of the engine's own hotkeys (such windowed/fullscreen mode toggle) not working during certain skippable game states.
- Fixed overlay was set to wrong position if it were using TextWindow gui and either its text or X, Y properties got changed.
- Fixed crash occuring when the speech is using text window gui with zero Padding and the speech text is an empty line.
- Fixed characters and room objects were not updating their looks if their current graphic was a Dynamic Sprite, and that sprite was modified with ChangeCanvasSize, CopyTransparencyMask, Crop, Flip, Resize, Rotate or Tint function.
- Fixed Views' frames keeping reference to deleted Dynamic Sprites causing crashes. Now they will be reset to dummy sprite 0 for safety.
- Fixed engine crash when button's graphic is set to sprite out of range.
- Fixed animated cursor's normal graphic reappearing in between animation frames if mouse mode is being repeatedly reassigned, for example in rep-exec script.
- Fixed certain interactions did not work with GUI if it was made fully transparent.
- Fixed ListBox.FillSaveGameList() search pattern, it included files which contain save filename pattern but do not exactly match; for example: "agssave.001_".
- Fixed engine was ignoring audio files in game directory when running games which use old audio system.
- Fixed crash in Direct3D and OpenGL renderers that occured if game uses a plugin that performs software drawing on screen, and one of the rooms is smaller than the game's resolution.
- Fixed Direct3D was assigning wrong fullscreen refresh rate sometimes, slowing alt-tabbing.
- Fixed "--test" mode was lost upon restoring a save.

Engine Plugin API:
- Added IAGSEngine::GetRenderStageDesc() function which returns current render stage parameters. As of this version these parameters include 3 transformation matrixes, allowing any 3D render plugin to stay compliant to engine's scene rendering.

Compatibility:
- Fixed engine was trying to read unnecessary data when loading pre-2.72 games.
- Fixed "upscale" mode for old games (was broken in 3.5.0). Also engine will now try to detect if "upscale" mode wanted by reading old config options (if they are present).
- Fixed GUI.Visible not returning expected values for GUIs with "Popup At Y" style in pre-3.5.0 games, breaking some older games logic.
- Fixed potential buffer overflow when reading pre-3.1.0 games with old dialog script texts.
- Fixed engine was applying player's position too early when ChangeRoom was called for 2.72 and earlier games, which could result in wrong placement in the new room if the character was walking right before the transition.

Android:
- Corrected game scanning in AGS launcher, now it will work consistently with the desktop ports, and detect any compatible game data files named "*.ags" or "*.exe".

OSX:
- When looking for game files engine will no longer use hardcoded filename, will search for any compatible pack file instead.

Windows:
- Windows version of the engine now reads global configuration file. It is looked up in "%USERPROFILE%/Saved Games/Adventure Game Studio/acsetup.cfg"
- Default log file location is now also in "%USERPROFILE%/Saved Games/Adventure Game Studio".
- Added "--no-message-box" command line option to hide message boxes when alerts are raised. These messages will be still printed to log (if one is enabled).
- Added "--console-attach" command line option to try attach to the parent process's console. This is useful if you run game from command line and want to see engine's log in the console.

WinSetup:
- Fixed changing fullscreen mode from "use current desktop" to explicit resolution on save.







Thanks to everyone who contributed to and tested this version!



#2767
Quote from: FanOfHumor on Sun 31/07/2022 22:16:19
Reading the code does work in the write order but the next integers after the first three aren't accessed by the reading script.
What is meant to be is that the three integers load from the txt file then in the next game loop the same integers load from the next three that are after that in the txt file.

Are you maybe reopening File each loop iteration? Is the reading code you posted above fully inside a  loop? Each time you reopen a file it is read from the start, so that would explain the problem.

The idea is to open a file once before the loop, then read inside a loop, then close a file.

Something like
Code: ags

File* loadmap = File.Open("$INSTALLDIR$/tilemap.txt",eFileRead);

while (!loadmap.EOF)
{
        tilex=loadmap.ReadInt();
        tiley=loadmap.ReadInt();
        tilesprite=loadmap.ReadInt();
        // create overlay etc
}

loadmap.Close();

#2768
Updated to Beta 12
(use download links in the first post)

Again, unplanned, this update amends both script API and engine plugin API. The script API changes are small, more like "filling the gaps", where it was trivial.
The plugin api changes are related to font plugin and drawing support.

Editor:
- Fixed "Goto Definition" not working for Enums and Defines (macros).

Script API:
- Added AudioChannel.SeekMs(), complementing PositionMs (as the Seek() function interprets position differently depending on the audio format).
- PlayVideo() now supports an option to play both game's and video's audio track simultaneously.
An updated information on PlayVideo may be found here: https://github.com/adventuregamestudio/ags-manual/wiki/Multimedia#playvideo
(this will be compiled to a manual eventually)

Engine:
- Added SpriteFont plugin to the list of builtins, for ports that use ones. SpriteFont plugin is updated to support custom "Clifftop Games" font variants.
- Added "--background" command line option which forces the game to continue running when in background (aka multitasking mode).
- Fixed AudioChannel.Position/PositionMs could show doubled values for short repeating clips.
- Fixed AudioChannel.Seek and Position are not working correctly for WAV clips (still not working for MOD and MIDI clips).

Engine Plugin API:
- Added IAGSEngine::GetGameInfo() function which returns information about the game, such as its title and GUID.
- Added new render callback AGSE_POSTROOMDRAW, for handling drawing inside the room above all room objects.
- Added IAGSFontRenderer2 interface, expanding the original font renderer interface, improving font plugins support.
- Added ReplaceFontRenderer2() and NotifyFontUpdated() functions.

The new IAGSFontRenderer2 looks like this:
Code: cpp

class IAGSFontRenderer2 : IAGSFontRenderer {
  virtual int GetVersion();
  virtual const char *GetRendererName();
  virtual const char *GetFontName(int fontNumber);
  virtual int GetFontHeight(int fontNumber);
  virtual int GetLineSpacing(int fontNumber);
}

and was primarily added to let font plugins to return font's height and linespacing without utilitizing GetTextHeight.
#2769
Quote from: FanOfHumor on Sat 30/07/2022 23:19:12
I'm having trouble getting the integers to change to the next values in the text file.

I've tried using seek to choose the next line but that doesn't seem to work either. I probably am using seek wrong so if you could please show me how I would appreciate it.

You do not need to use Seek at all, just like when you are using WriteInt and similar, ReadInt will automatically advance further in file. The use of Seek is for special cases only, like when you need to return back in file to edit something you've already written, or read a file in a different order.

If the values you read back are not what you expect, then either writing was incorrect, or you read in a wrong order. Please post a code that writes the file?
#2770
Quote from: Pajama Sam on Sat 30/07/2022 19:08:14but I suppose the only way is to move the numbers to integers in the other game and place them in a loop that runs tile[tilenum]=Overlay.CreateRoomGraphical(x,y,dfg); till it reaches the end of the txt file.

Yes, that's a normal way to do this.
#2771
Quote from: Pajama Sam on Sat 30/07/2022 18:46:19
No this is not related to that.Its ags script.I just don't know how to run the ags script that was written to the text file.

So in that case, this is not possible, as AGS engine cannot run text, it runs compiled script (this is called "bytecode"). Also it cannot run any arbitrary script, only if it's one of the modules.
So the script has to be compiled, and registered as a part of the game to run (be one of the modules that is defined in the game).

There is technically a way to recompile scripts and repack the game using special programs, but that's rather a solution for updating the game (for example when you want to patch your game on player's computer).

Could you tell more about your situation, why do you want to do this?
#2772
I removed the previous answer, because I've got a feeling that you are asking not what I thought you are asking.

So, first of all, to clarify: are you asking about actual AGS script, or are you asking about some "custom" script, where you have your own commands?

Is this related to the text you were constructing in another question here?
#2773
Quote from: Matti on Sat 30/07/2022 16:39:39
In a scrolling room you need to add GetViewportX() / GetViewportY() to mouse.x and mouse.y to get the right room coordinates.

To clarify, the new way to do this since AGS 3.5.0 is: Game.Camera.X and Y.
Also, if you are using a more complex room viewport/camera setup (with viewport offset and camera zooming), then there's Screen.ScreenToRoomPoint and Screen.RoomToScreenPoint functions.
#2774
Quote from: eri0o on Fri 29/07/2022 22:41:25Do you have any specific size, looks or something in mind?

The one that would look good in the default template. I can tell whether something looks fine or not, but I doubt that may guess size or style beforehand.
Maybe we should ask around people who make games, see if they can find a suitable font for the default template's style.
#2775
Quote from: vga256 on Fri 29/07/2022 21:20:22
if the roomObject's "Clickable" property is set to false, no object is found at that location. If the roomObject's Clickable property is set to true, an object is found as expected.

Yes it's a default AGS behavior, it's exactly the same with any other type of object. Also afaik it does not show @OVERHOTSPOT@ for nonclickable objects.

The solution have been to remember old value, set Clickable, check, and then revert Clickable to old value.

Maybe we may change this in the future versions, like, providing a "test_clickable" parameter to this function, or something.
#2776
The game's window is scaled by changing the game setup. There's Default Setup pane in the editor that lets you edit default values, and also you may build game and run winsetup.exe (Build -> Run setup) to configure your personal settings for a test.

Please elaborate on menus scaling, - how do you make your menus, and what the problem actually is?
#2777
Quote from: skooperstooper on Fri 29/07/2022 19:31:08
I found the code crimson mentioned in the keyboard movement script and copy pasted the replacement as provided. Movement behavior didn't change. I deleted that block of code entirely and ran the game again. Movement behavior still didn't change.

That made me think movement is being controlled by something else, so I searched for more code in the movement script that included walkstraight and found this on its own line:

This module works in two modes: tapping and holding (set by KeyboardMovement.Mode). Each is implemented by a separate script block. That's true that I showed how to change only one of them; the second may be edited similarily, with some differences.
#2778
Quote from: skooperstooper on Thu 28/07/2022 22:49:14
The default behavior is that the player can walk left, right, up and down. My game will have no room depth. I only want the player to be able to walk left or right, with up and down controls causing the player to face up or down. Not actually move.

If you are speaking of keyboard controls, and using default template where these are implemented as KeyboardMovement script, then the solution is to find where the script makes character walk (calling "WalkStraight") and replace that with "FaceDirection" command for up/down presses.

For instance it has this:
Code: ags

  if (old.x != move.x || old.y != move.y)
  {
    player.WalkStraight(player.x + move.x * distance, player.y + move.y * distance, eNoBlock);
  }

This may be replaced with
Code: ags

  if (old.x != move.x)
  {
    player.WalkStraight(player.x + move.x * distance, player.y, eNoBlock);
  }
  else if (old.y < move.y)
  {
    player.FaceDirection(eDirectionDown);
  }
  else if (old.y > move.y)
  {
    player.FaceDirection(eDirectionUp);
  }






For mouse controls, supposing you have something like this, originally:
Code: ags

  if (button == eMouseLeft)
  {
    // left-click, so try using the current mouse cursor mode at this position
    Room.ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }


Then you need to check if this is a walk cursor mode (may vary depending on which cursor modes you use in your game), and add a separate case for walking where you clamp Y coordinate to the current player's position; or maybe using WalkStraight to ensure it walks precisely along the axis.
Code: ags

  if (button == eMouseLeft)
  {
    // left-click, so try using the current mouse cursor mode at this position
    if (mouse.Mode == eModeWalkto)
    {
       // here we are essentially forcing Y coord to always stay the same
       // NOTE: (mouse.x + Game.Camera.X) converts from screen to room coordinates
       player.WalkStraight(mouse.x + Game.Camera.X, player.y, eNoBlock);
    }
    else
    {
       Room.ProcessClick(mouse.x, mouse.y, mouse.Mode );
    }
  }
#2779
Quote from: Laura Hunt on Thu 28/07/2022 20:40:07
I thought that the beta versions were still ANSI by default and that this would only be changed with the official release, once appropriate fonts had been found and implemented. Was this not the intention?

The intention was to have default at Unicode, but apparently I forgot about the default fonts in templates.
#2780
Quote from: Laura Hunt on Thu 28/07/2022 19:39:32
If your game is in ASCII/ANSI (the way it is in the beta by default)

Please note that 3.6.0 is Unicode by default.

Quote from: Laura Hunt on Thu 28/07/2022 19:39:32
Now switch your game to Unicode, and these characters will be garbled. But if you import the same font to a different slot (e.g., font 2) and reassign SpeechFont and NormalFont to this one, the characters will once again display properly.

This sounds like a error either in editor or engine...
SMF spam blocked by CleanTalk