It's time for me to present to you the final version of AGS v2.61...
Changes since Pre-Final:* Fixed lockup which could occur with some nested interactions.
* Fixed Mouse Moves Over Hotspot being broken for hotspot 0 in beta 2.
* Fixed lockup when trying to delete a sprite which was in use.
All changes since v2.60 SP1:* Added AreThingsOverlapping, DisableGroundLevelAreas, EnableGroundLevelAreas, FileIsError, HasPlayerBeenInRoom, RawDrawImageResized, RawDrawImageTransparent, SaveCursorForLocationChange, SetCharacterFrame, SetGraphicalVariable, SetGUIObjectEnabled, SetInvItemName, SkipUntilCharacterStops script functions.
* Added operators % ! ^ << >> to scripting engine (remainder, Not, XOR, LeftShift, RightShift).
* Added repeatedly_execute_always script event function, which is called every game loop, even when a blocking function is running. Supported in both the global script and room scripts.
* Added character[].z variable, to allow you to make a character levitate into the air whilst still using the baseline, light levels and interactions of its Y co-ordinate.
* Added OLE Automation support to editor, to allow plugins to interact with the editor, add menu options, new panes, and so forth. This includes support for editor-only plugins which are not included with the game at run-time.
* Added plugin API engine functions BlitSpriteRotated, BlitSpriteTranslucent, CanRunScriptFunctionNow, CallGameScriptFunction, DisableSound, GetDirectSound and UnrequestEventHook; events AGSE_SCRIPTDEBUG and AGSE_AUDIODECODE; and new entry point AGS_EngineShutdown.
* Added view preview window to let you quickly test loop animations.
* Added ability to get a view frame's speed and sprite number from GetGameParameter.
* Added game.speech_text_align variable to control the alignment of lucasarts-style speech.
* Added game.auto_use_walkto_points variable to allow you to stop the engine automatically moving the player to walk-to points.
* Added game.inventory_greys_out variable to enable inventory controls to grey out with the rest of the GUI when disabled.
* Added game.skip_speech_specific_key variable, which allows you to set that only one particular key can skip speech (eg '.' in old lucasarts games).
* Added system.viewport_width, system.viewport_height, system.version text script variables.
* Added "Mouse click only" skip speech style, which only allows speech to be skipped with a mouse click, not a key press.
* Added "Change colour depth" option to Game menu, to make it more intuitive than just being on the Palette pane.
* Implemented Match Brace feature in script editor.
* Changed text window background image positioning and clipping such that you can now have transparent edges on the outside of the border graphics whilst using a background image.
* Newly added GUI Buttons are now set to Run Script by default.
* Added ability to set a tiled background image for GUI sliders.
* Enabled sliders to be grabbed by the entire width of the handle, not just the width of the main slider bar.
* Added "Handle offset" option to sliders, to allow you to manually shift the handle across if the graphic doesn't line up properly.
* Added Cancel button to the InputBox (and the Debug Ctrl+X box).
* Editor welcome dialog now displays game folder name before complete path in Recent Games list.
* Stopped autocomplete list popping up when inside strings and comments in the script editor.
* Increased max dialog messages to 3000.
* Increased max speech files from 2000 to 3000.
* Changed the Object Pos display in the Objects pane of the editor to display the lower-left co-ordinate, as used in the game engine, rather than the top-left.
* Renamed "Blank game" to "Default game", and added "Empty game" template (courtesy of AGA) which has no default sprites at all.
* The Dump Text feature now also dumps the script header if "Text scripts" is selected.
* Changed goto-previous to save a nested history of previous topics so that it can be used to retreat up the dialog tree.
* Ambient sound is now restored properly after a PlayVideo.
* Added low disk space check when saving a save game slot.
* Added option to script editor Find dialog to start search from current location, rather than start of script.
* Lucasarts-style speech now abides by the setting of game.close_mouth_end_speech_time.
* Encrypted strings in compiled files, to prevent the player loading the exe into notepad to cheat.
* Mouseover GUI button pics no longer work while in a blocking cutscene.
* While moving a GUI object, the X/Y co-ordinates update dynamically in the properties window.
* When using FOLLOW_EXACTLY, the following character is now drawn in front of the followed character; an extra option to FollowCharacterEx allows you to reverse this behaviour if you wish.
* Editor now remembers the settings of "Lock sprite to current room" and "Remap colours to game palette" between imports.
* Prevent the user restoring a save game if views have been added to the game since it was saved. This prevents later problems with the SetCharacterView and SetObjectView functions.
* Removed close button from Edit Action window in the interaction editor, to fix the problem where a script could get disconnected from its interaction.
* Removed the "Don't automatically lose inventory" option - it's now always on (not having it checked was a debugging nightmare).
* PlayAmbientSound now does not reset the sound if you play an ambient sound that is already playing.
* CyclePalette now supports rotating the colours in both directions.
* FaceCharacter(EGO,EGO) now does nothing rather than facing left.
* Default hotspot names (eg "Hotspot 1") are no longer output in the translation source file.
* Keypresses are now discarded rather than queued if a blocking script is running when you press the key.
* Skipping cutscene will now skip text boxes if No Auto Remove text is set, rather than hanging the game.
* Fixed character walking on the spot at the end of a move occasionally.
* Fixed Talk cursor flashing up briefly before dialog options turn back on during a conversation.
* Fixed MoveToWalkableArea not working if the character was off the screen.
* Fixed QFG4-style speech not working.
* Fixed crash in DisplayTopBar.
* Fixed Sierra-style speech not supporting flipped view frames.
* Fixed lockup which could occur with some nested interactions.
* Fixed bug where characters could get stuck when using Adjust Speed with Scaling.
* Fixed Setup program not working if it was run from the command line.
* Fixed font wierdness and crashing the first time you run a new game made from a template.
* Fixed "Mouse moves over hotspot" running even if the mouse was actually moving over a GUI on top of the hotspot.
* Fixed GUIs sometimes not re-enabling themselves until the mouse moved over them.
* Fixed continuous idle loops not starting immediately after speech finished.
* Fixed character view not always getting set back to normal view after talking but before dialog options are displayed.
* Fixed script compiler allowing local strings to be returned from functions.
* Fixed crash in SetGlobalString if you passed a very long string to it - now truncates to 200 characters instead.
* Fixed translation output including text from deleted GUI buttons and labels.
* Fixed auto-timeout text not working with DisplayTopBar.
* Fixed editor having problems with finding the right script function to edit if you made a mistake with { } placement.
* Fixed character being moved to non-walkable area if you left a room that it was moving in.
* Fixed editor wiping most of the currently loaded room when you loaded a different game in.
* Fixed editor problem editing script functions if the function was called before it was used
* Fixed DisplaySpeech resetting the character's frame to 0 after they finished talking.
* Fixed compile error if a string ended in a backslash.
* Fixed problem with #define if tabs were used rather than spaces.
* Fixed commented out #define statements so that they are properly ignored by the compiler.
* Fixed 100% CPU usage while a text box was displayed.
* Fixed character portrait remaining on screen when the parser-in- dialog was used.
* Fixed digital speech and music files not being used if the current directory was not the game's directory when the game was run.
* Fixed IsKeyPressed not working with shift, ctrl and alt.
* Fixed idle animation not always kicking in straight away after the character stopped moving.
* Fixed '@' character not being displayed in GUI labels.
* Fixed region tint problem if the amount was set to 50%
* Fixed error message if you set the game to start in room -1.
* Fixed inventory hotspot colours >32000 not working
* Fixed GUI Properties window appearing on the taskbar.
* Fixed GUI button text not being drawn backwards when Backwards Text was enabled.
* Fixed config file "datadir" setting not working with root directories.
* Fixed editor crash if you pressed Alt+F4 while the GUI Properties window was selected.
* Fixed editor crash if you closed the Interaction Editor while the script editor window was open.
What is COM plugin support?This is a new type of plugin support, which allows the creation of editor-only plugins. These plugins appear as usual in the Plugin Manager, but rather than adding extra features to your game, they can enhance the editor. Therefore, you can use a COM plugin without making your game rely on any external DLL's.
Currently the AGS Editor provides a full implementation of interfaces to allow access to Dialogs, and not a lot else. If people find it useful, however, I can add further interfaces to the rest of the editor.
What are they useful for? Well, it enables plugins such as:
* globalints list
* sounds list
* export dialogs as text
* view dialogs as tree
For more information, see:
http://www.bigbluecup.com/accomplug.htmWhat are these "#sectionstart" things that are littering my script?The new #sectionstart and #sectionends have been introduced to once and for all fix problems people have been having editing script functions. Basically, if there was a brace missing somewhere, the editor got all confused when parsing the script file and could screw up the script.
This way, it looks a bit messy, but it also means that there should no longer be any problems with editing script functions.
What's a LeftShift/RightShift/XOR operator?If you don't know, you don't need to know. They're quite advanced operators that most people won't need.
What's a Remainder operator?The new % operator (also known as Mod) calculates the remainder of a division. Suppose you have a raw time in seconds and you want to display it as Minutes:Seconds. you can do:
int minutes = raw_time / 60;
int seconds = raw_time % 60;
How does the new repeatedly_execute_always work?You can add the new function to your global script, as follows:
function repeatedly_execute_always() {
}
It will be called once every game loop, just like repeatedly_execute. There are two main differences though:
* repeatedly_execute_always is
always called - even when a blocking function is running
* repeatedly_execute_always
cannot call blocking functions itself.
If you try to use a blocking (eg. Wait, MoveCharacterBlocking) or delayed-response (eg. NewRoom, RestoreGameSlot) function from within repeatedly_execute_always, the game will exit with an error.
There are several handy uses for this function, and you'll notice that you can also do tricks with it to interrupt blocking functions. If you call StopMoving, for example, then if the main script is currently blocked on MoveCharacterBlocking, it will resume.
http://www.bigbluecup.com/ags_261.zipIf no serious bugs are found in the next few days, this will become the official 2.61 and I'll upload it to the website.