Author Topic: Suggestions for items to be added to the FAQ (since 25-10-2019)  (Read 5272 times)

Gilbert

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
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.


* 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.

* 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.
« Last Edit: 03 Dec 2019, 21:35 by Crimson Wizard »

eri0o

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

This question was asked pretty many times, in different variations: https://www.adventuregamestudio.co.uk/forums/index.php?topic=57613.0

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.

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

* Example:


Code: Adventure Game Studio
  1. function repeatedly_execute()
  2. {
  3.     if (oObject1.Animating && oObject1.View == SOME_VIEW && oObject1.Loop == SOME_LOOP && oObject1.Frame == SOME_FRAME) {
  4.          // Do action
  5.     }
  6. }
  7.  

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

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

  • Epically wrote function to declare an int
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.
« Last Edit: 22 Mar 2020, 22:15 by TheManInBoots »

eri0o

@TheManInBoots, wrote a big table of obsolete functions here : https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html

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.