Adventure Game Studio | Forums

AGS Support => Beginners' Technical Questions => Topic started by: Gilbert on 25 Oct 2019, 02:15

Title: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Gilbert on 25 Oct 2019, 02:15
This is more or less a successor of this topic (https://www.adventuregamestudio.co.uk/forums/index.php?topic=23558.0).

We are planning to update the original FAQ (https://adventuregamestudio.github.io/ags-manual/FAQ.html) 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.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 26 Oct 2019, 15:12
This question is asked all the time: https://www.adventuregamestudio.co.uk/forums/index.php?topic=57540.0
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 01 Dec 2019, 18:45
* 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.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 03 Dec 2019, 20:22
* 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.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: eri0o on 04 Dec 2019, 12:27
just adding +1 on how to call a script function elsewhere.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 07 Dec 2019, 01:01
This question was asked pretty many times, in different variations: https://www.adventuregamestudio.co.uk/forums/index.php?topic=57613.0
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 08 Dec 2019, 11:39
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)
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: eri0o on 29 Dec 2019, 14:46
I added The function exists in script but calling it causes "function is undefined" error. to the manual FAQ on the wiki.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 27 Jan 2020, 01:00
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.  
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 20 Mar 2020, 23:24
Also seem to be asked often: how to hide player character in particular room (main menu, intro, etc).
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: fernewelten on 21 Mar 2020, 03:22
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().
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: TheManInBoots on 22 Mar 2020, 21:31
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.
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: eri0o on 06 Oct 2020, 14:08
@TheManInBoots, wrote a big table of obsolete functions here : https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: Crimson Wizard on 03 Dec 2020, 01:31
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)
Title: Re: Suggestions for items to be added to the FAQ (since 25-10-2019)
Post by: eri0o on 31 Dec 2020, 01:45
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.