System.ViewportWidth variable

Started by nightmarer, Fri 20/03/2020 22:02:54

Previous topic - Next topic

nightmarer

Good evening everyone.

I am following the tutorials available https://www.youtube.com/watch?v=79yTq3BQo14&list=PL21DB402CB4DAEAEF&index=19
and in this video at 5:21 they refer to two System variables to get the project width and height.

  System.ViewportWidth;
  System.ViewportHeight;

which is are not accepted by my AGS, displaying the following error:

ViewportWidth is not a public member of System. Are you sure you spelt it correctly (remember, capital letters are important)?

I am checking the manuals and I can't find this system variable. Do you know if it exists, or if it is posible to get this information with another variable?

Thank you very much and regards.

morganw

If you are using AGS 3.5 part of the changes to implement the camera system introduced replacements for these values:
Code: ags

Screen.Width
Screen.Height


https://adventuregamestudio.github.io/ags-manual/Screen.html

You could also change the compatibility levels of the project to get the old commands back, but you are likely better to use the newest version of everything.

nightmarer

Thank you very much Morgan.

I will use these new variables.

Regards.

Crimson Wizard

Quote from: nightmarer on Fri 20/03/2020 22:02:54
I am checking the manuals and I can't find this system variable. Do you know if it exists, or if it is posible to get this information with another variable?

Do you mean that you was not able to find it in the manual at all? The topic is still present, may be found in both Index and Search, and in these pages the properties are marked as "obsolete" and there's a suggestion to use Screen.Width/Height instead.

I am asking, because want to be sure that the documentation is working properly.

TheManInBoots

I found the topic when I searched it.
It is very clearly documented in the
"Upgrading to AGS 3.5" section of the manual.

So the documentation is proper.
However, the search engine in and of itself might need an upgrade or two imo, to be more usable...

Crimson Wizard

Quote from: TheManInBoots on Fri 20/03/2020 22:34:45
I found the topic when I searched it.
It is very clearly documented in the
"Upgrading to AGS 3.5" section of the manual.

No, I mean, there should be topics called "System.ViewportWidth" and "System.ViewportHeight" still.


Quote from: TheManInBoots on Fri 20/03/2020 22:34:45
However, the search engine in and of itself might need an upgrade or two imo, to be more usable...

Could you elaborate on this?

TheManInBoots

#6
Ah, okay. I checked, the topics are listed.


Especially the search tab would benefit from some improvements I think.

For the reason being:
You cannot jump to the search results directly.
Sometimes you have to spend minutes just scrolling through an entire topic, paying careful attention not to miss the little high lighted blue line marking the search result.
It's very time consuming and exhausting.

Also the layout of having all words highlighted is quite confusing and does not give you a good overview at all.

A better solution I could think of would be to obtain a list of all the paragraph titles of the search results. First the paragraphs that include the search term in their title, and then the paragraphs that include the search term only in their text body.

Also if not a list for clear overview, maybe a button that makes you jump from one search result to the next could be quite helpful. So that you do not have to scroll through the manual for "hours" just to spot and find the search result.

There is always a message displayed ("Click to cancel search!"), for a few milliseconds for EVERY search you do. That is confusing because it makes me wonder if it says that there were no search results found. Also, nowadays, computers do searches in milliseconds so this message is not necessary anymore.

The 'Match similar words' does not seem to be sufficient.
When I type for example hasplayerbeen I get no results. I have to type the entire function 'hasplayerbeeninroom' in order to obtain a result.
Also I do not get a suggestion when typing playerhasbeen. It would be useful if the search tab could give suggestions of that type in case you are looking for a specific function but cannot exactly remember its name.

(Btw, I did not find any topic on "player" or "points" (not pointers, points!) specifically...)

So far to answer your question...

nightmarer

#7
Hello.

I'm sorry, In the manual I typed it but it didn't show anything. I tried to search even system variables but I couldn't found anything, finally typing screen I found something similar, but I didn't know if it did exactly the same.
Maybe the problem is that I am not very familiar with this, yet.

Regards.

TheManInBoots

#8
It's fine nightmarer  :P

Regards

SMF spam blocked by CleanTalk