Suggestions for items to be added to the FAQ (since 25-10-2019)

Started by Gilbert, Fri 25/10/2019 02:15:50

Previous topic - Next topic

Gilbert

This is more or less a successor of this topic.

We are planning to update the original FAQ of the AGS Manual to include various common problems encountered when using AGS.

So, if you find something worth mentioning there (such as useful tips and recurring problems) just reply here (usually by including a link to the forum thread mentioning the problems) and we may then update the FAQ.


Crimson Wizard

* How to not have to repeat same command with all the parameters / same chunk of code all the time?
solution: make a custom script function

* How to have Display and still have animations at background?
solution: use GUI and Wait function.

Crimson Wizard

* The function exists in script but calling it causes "function is undefined" error.
Answer:
1) if you are calling from another script, make sure function is correctly declared as import in it's script header
2) make sure function declared/defined above your call in script or placed in a higher script module, move function up if necessary.

* I change settings in Default Setup pane in editor, but in game nothing changes.
Solution: Default Setup affects only default configuration. If you ran winsetup at least once and saved, there's already personal configuration written in your user documents, which overrides defaults. Change the setting by running winsetup as well, or delete user config to reset to defaults.

eri0o

just adding +1 on how to call a script function elsewhere.


Crimson Wizard

Q: I loaded my old game in a newer editor, and now I get errors about some AGS functions not defined.
A: These functions were probably deprecated. Check the "Upgrade for X.X.X" topics in the manual to learn about possible breaking changes and how can you adjust your script to the new standard.
If you're in hurry, go to General Settings and set "Script compatibility level" to the version you were making game in previously (that usually works).

(all of those are rough draft ofc and should be improved and expanded)

eri0o

I added The function exists in script but calling it causes "function is undefined" error. to the manual FAQ on the wiki.

Crimson Wizard

Also asked often:
* How do I do some action when animation reaches particular frame?

* Example:


Code: ags

function repeatedly_execute()
{
    if (oObject1.Animating && oObject1.View == SOME_VIEW && oObject1.Loop == SOME_LOOP && oObject1.Frame == SOME_FRAME) {
         // Do action
    }
}

Crimson Wizard

Also seem to be asked often: how to hide player character in particular room (main menu, intro, etc).

fernewelten

Quote from: Crimson Wizard on Fri 20/03/2020 23:24:25
how to hide player character in particular room (main menu, intro, etc).

To the best of searching abilities, indeed, "Character.on" isn't described anywhere in the in-Editor doc of the newest official AGS version.

The way to do this that I'd think of first: Set player.on to false in room_Load() and set it to true again in room_Leave().

TheManInBoots

Aren't outdated, old functions brought up on a relatively regular basis?
Also module-related...
Maybe a section on that could be useful, which then refers to manuals and sections talking about upgrading...

I'm not sure what you mean with "tips", Gilbert, but there is an arrow down button that opens a list of all the labels in the editor. That is extremely helpful when you work with several rooms, and you cannot see all the open tabs anymore. That button is hard to see and could be mentioned as a tip.


Crimson Wizard

Added all the remaining above from this thread: https://github.com/adventuregamestudio/ags-manual/wiki/FAQ

(maybe in the future we may need to split FAQ in some sections too, for faster navigation, if it becomes overfilled)

eri0o

Ah, a problem I have not figured with the FAQ is having the questions have anchors in some way so a Table of Contents could be available in the to navigate questions. Perhaps the whole questions could be titles themselves.

SMF spam blocked by CleanTalk