-
Notifications
You must be signed in to change notification settings - Fork 9
This section of the manual is very rarely updated. Please visit the AGS Forums or AGS Discord server if you need more answers on beginner questions.
Q. Can I make commercial games with AGS?
A. Yes, absolutely. AGS is completely free to use for creating any kind of games, whether commercial or not.
Q. Can I make non-adventure games with AGS (platformer, strategy, card game, roguelike, ...)?
A. Yes, and such games were made with AGS in the past. But you should know that AGS was created as a point'n'click adventure Engine and Editor, and the way it works prioritizes this genre. In order to make something different you will have to apply considerably bigger effort.
Q. What resolution should I make my game in?
A. AGS games are not different from any other games. Think on what resolution would match your chosen game design and graphic style. Experiment, make few test games to find out what's best fit.
It's important to know the difference between "native resolution" and "window resolution". Your game itself may be as small as 320 x 200, but AGS allows players to stretch the game window to any size, scaling your game up (or down, although that usually is not a good thing), without any extra effort from you. So if you want to use "old-school" low-res graphics you don't have to worry about how to display your game on larger monitors.
Q. I just started making a new game, but Editor throws an error at me: "The game is set to start in room -1 which does not exist". What does that mean?
A. Each game has a main character, aka "player character", and starts in the room this character is assigned to. Open your main character for editing and make sure its "StartingRoom" property is valid (of course we assume that you've created at least one room already).
Q. On my screen, I can't move the main character. Wherever I click to move him, he just stands there.
A. If the main character isn't on a walkable area, he will not be able to move. Load the room in the editor, and check that the location where the character starts is on a walkable area.
Q. I am looking/interacting with an object but nothing happens, but I have it on the script file.
A. In the AGS Room Editor, under the object properties, in events, the field should be filled with the function to execute, wiring the room element to the script. If it's empty, clicking on the three dots button (...) the respective script will be open with the a new function for you to fill the details. If it has a value, clicking on the same button will direct you to it on the respective script file. This is true for all events, so for example a 'room_Load' script function won't trigger if it's not wired on the room events. It's usually easier to click on the three dots button of the event you want to develop in the Room Editor, which will generate the function on the script file for you to fill up.
Q. I click on a GUI button, but nothing happens. It doesn't seem to register clicks!
A. There are some different immediate suspects here.
- Is the button set to Run Script? Go to the GUI Editor, select the button, and make sure that in its properties window, "Click Action" is set to "Run Script".
- Is your script wired to the button's event? In the button properties, in events, the "OnClick" field should be filled with the function to execute.
- Is the GUI and the button clickable? Make sure that the "Clickable" property is set to "True" for both of them.
- Alternatively, if you are creating many GUIs, check if you have created a transparent, clickable GUI that is on top of the GUI you are clicking.
Q. When I enter a certain room, I just get a black screen.
A. Make sure that you haven't used a blocking script command such as "Display", "Character.Say", "Character.Walk" or similar in the "Enters room before fade-in" event for that room. Remember that this event happens BEFORE the screen fades in.
To make sure, when you get the black screen, try pressing enter, or clicking the left mouse button. If nothing happens then something more serious may have happened. If this is the case, while running the game from the Editor, switch to the Editor and click on "Pause" button on toolbar: that will stop game execution and may allow you to trace which line of script it has stuck on.
Q. How do I make a main menu for my game?
A. There are various ways to do this, depending on how do you want your menu to work, but in general there's no dedicated "menu screen" feature in AGS, so you have to use any combination of common items. You could begin with creating a new room, assign a plain coloured background, and place objects to act like menu options. Or you could create a GUI with buttons. But you also may do a full scene with animating objects, characters and minigames, and force player to solve a puzzle in order to start a "real" game.
Q. Can I hide player character in particular room (main menu, intro, credits screen)?
A. Open your room in the Room Editor and set its "ShowPlayerCharacter" property to "False".
If you want to hide player character only for some time, you may set that character's Transparency to "100" in script, or just move him/her out of the room borders, for example, by assigning x position to a large negative value.
Q. The character isn't drawn behind my walk-behind areas!
A. You need to define the baseline for these areas, baselines determine the order things (characters, objects and walk-behinds) are arranged in the room.
Q. There's a bunch of identical script commands I need to execute on several events, is there a way to not copy/paste same 5 (20, 50, 100) lines everywhere I need them?
A. Sure, create your own custom function in script, put these commands there, and call this functions each time you want these commands executed. Refer to Scripting Tutorial for more on this subject.
Q. I created a script function, but I get "function is undefined" error trying to call it elsewhere.
A. If you have a function written in script file my_script_A.asc
, and you want to call it from a different script file my_script_B.asc
, you need to correctly declare it as import on it's header my_script_A.ash
. Additionally, make sure the function is declared/defined above your call in script or placed in a higher script module, move function up if necessary.
Q. Can I use script commands on my dialogues?
A. Yes, you can. The dialog lines that start with at least one space character are interpreted as plain script, and the ones that don't are treated as special dialog commands. All special dialog commands are actually converted into real AGS script before compiling into your game.
Q. How do I change object's "Name" or "Description" at runtime so that I could display a different one after a game event?
A. At the time of writing this answer AGS does not let you change these values, as well as few other properties at runtime (this may be fixed in future versions). The common solution is to use "Custom Properties", which you define in the Editor and may modify in script using SetProperty and SetTextProperty functions for the respective object type.
Q. How do I keep animations running while I am showing a message on screen using Display function?
A. "Display" command pauses whole game, use an Overlay or GUI with a label instead. You may make them look similar to Display by defining background and border colours, or assigning a sprite. Then use "Wait" or "WaitMouseKey" command to halt the game while this Overlay or GUI is on screen.
Q. How do I do an action when animation reaches certain frame?
A. In repeatedly_execute function test whether an object is animating
, and what it's current View, Loop and Frame properties (Characters and Buttons have similar values). Execute an action when these properties match your condition.
Q. How do I put a variable on a GUI label?
A. String.Format
script function allows to create a string with variable printed in it. You may then use that string anywhere, for example, assign to a label's Text property.
Q. My game EXE file seems to have disappeared.
A. Because this file is your entire game, including the room files, when you save a room in the Room Editor it will delete the exe file (because the room contained in the exe is out of date). To get it back, simply build the game again by using the "Build EXE" command on the Build menu.
Q. I change settings in Default Setup pane in the Editor, but in game nothing changes.
A. Default Setup affects only default configuration. If you ran game's own setup program at least once and saved, there's already personal configuration written in your user documents, which overrides defaults. Also some of the settings are written by the game itself on exit. Change the setting by running setup program as well, or delete user config file to reset everything to defaults.
Q: I loaded my old game in a newer version of AGS, and now I get errors about some AGS functions are "undefined".
A: These functions were probably deprecated. Check the "Upgrading from a previous version" topics in the manual to learn about possible breaking changes and how can you adjust your script to the new standard.
There's also a big table of outdated functions and properties where you may find suggested replacements.
But if you're in a real hurry, go to game's General Settings and set "Script compatibility level" to the version you were making game in previously (that usually works).
Q. How should I name my views, objects, ...
A. When you are looking into your objects in the Room Editor, they are obviously an object. When you are referencing them on script, you can get lost. It's a good and common practice when using AGS to precede the name of an element with a lower case letter of it's type, make it easier to find them in the Editor with auto complete (ctrl+space) and the consistency will make easier to remember. So for a view, something like vRogerWalking
is a good name, and the v
at start tells you it's a view; A character with real name Joe, is a good idea to have the script name be cJoe, now the c
reminds of character; a GUI for a lever puzzle could be called gLeverPuzzle
; An object that is a flower as oFlower
; A hotspot of the exit door as hExitDoor.
Q. Can I create games that use a text parser, similar to the classic Sierra adventure games, such as King's Quest and Space Quest?
A: Yes, AGS allows for the development of games that use text parser input. It is possible to create games that use an "always on" text parser (used in AGI games, such as Kings Quest I) as well as a "pop up" text parser (used in SCI games such as Space Quest 3). See more in the Text Parser topic in the manual.
Getting Started in AGS
Editor
- New Game templates
- Editor Preferences
- General Settings
- Default Setup
- Colours Editor
- Room Editor
- Character Editor
- Cursor Editor
- Dialog Editor
- Font Preview
- GUI Editor
- Inventory Items Editor
- View Editor
- Sprite Manager
- Music and sound
- Voice speech
- Script Modules
- System limits
- Log Panel
- Plugins
- Other Features
Engine
Scripting
- Scripting Tutorial
- Scripting Language
-
Scripting API
- Script API Overview
- Standard Constants
- Standard Enumerated Types
- Standard Types
- Game variables
- Global arrays
- Global event handlers
- repeatedly_execute / repeatedly_execute_always
- Custom dialog options rendering
- Global functions: general
- Global functions: message display
- Global functions: multimedia actions
- Global functions: palette operations
- Global functions: room actions
- Global functions: screen effects
- Global functions: wait
- AudioChannel functions and properties
- AudioClip functions and properties
- Camera functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- Dictionary functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game functions and properties
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Object functions and properties
- Overlay functions and properties
- Parser functions
- Region functions and properties
- Room functions and properties
- Screen functions and properties
- Set functions and properties
- Speech functions and properties
- String functions
- System functions and properties
- TextWindowGUI functions and properties
- ViewFrame functions and properties
- Viewport functions and properties
- Obsolete Script API
- Event Types
- Key code table
- Audio in script
Legal Notice
Getting in touch
Misc