Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Khris

#21
Was referring to the code that changes the action line, the one you added.
#22
Did you fix the cursor hotspots? You could also consider using a sprite that isn't a massive X and completely obscuring the thing you want to click?

Also check your code and make sure that it always puts new text on the label, regardless of which path the execution takes.
#23
@jmhimara

I'm familiar, I learned Scheme back in the day :)

With regards to being beginner friendly: I don't think another language is going to make a difference.

I've been active in the technical forums for over 15 years now, and the scripting language itself is decisively not what beginners tend to have issues with.

Replace AGScript with Ruby tomorrow, and the technical forums would look exactly the same.
Here's a bunch of actual issues people have:

-pure isometric movement
-how big are 1024x768 backgrounds? pixel wise?
-walking on a conveyor belt
-exit arrows cursors
-before/after a dialog, fade in/out the GUI
-do not restart music if same as previous room
-do z after x and y are done
-parse error (didn't put code inside functions)
-replacement for unhandled_event()
-region events don't fire during blocking walks
-prevent/change interaction globally (because player is tied to chair)
-I want to draw backgrounds like LucasArts

To be clear, I would absolutely love to be able to use JS. Is it going to happen? No. But would it help beginners? Also no.
#24
@jmhimara

The built-in language has its downsides*, however to me the bigger question is: is this really what's keeping your from using AGS? Disregarding the fact that Janet seems - to put it mildly - like the passion project of a single guy who for some reason thought existing languages don't use enough parentheses, what exactly would you gain if AGS did support other languages?

It's an honest question. If you rather want to write JS or C# or Python, why not pick one of the available engines that employ those?


* fewer and fewer all the time, thanks to amazing efforts by a bunch of people investing their free time, a big thanks to all of you!
#25
This was my bad, I sent a PM with "if (button == btnUse)" in it.

It was supposed to be a generic method of solving the "how to address a specific button" issue, not a line to be literally added to the script.

Anyway, like morgan says, you can most likely fix this by simply replacing "button" with "control".
#26
Made a small online tool: https://khris.ddns.net/agsparser/

1. Select your Game.agf file and you will see the list of words.

2. if you have already entered a bunch of words in AGS, click "Export word list" to create a text file called "words.txt" that contains all the custom words. Synonyms go in the same line, separated by a comma.
Now edit this file to your liking (or create a new one) putting one new word and its synonyms per line (you can also include blank lines and comments starting with # or //, and hanging commas and spaces are all removed):

Code: ags
apple
sofa,couch
test

# animals
dog,doggo
cat,kitten,kitty

// food
ice cream,popsicle
Finally, upload the file using the "Import word list" button.

3. The visible word list should update accordingly, and you can now download the new Game.agf file. Obviously, always back up your file before using the altered version.


(Note that you are just selecting files which are then loaded into your browser's memory. Nothing is actually uploaded to the server, let alone stored.)
#27
When I started out I simply browsed the technical forums looking for interesting threads. I don't know of any text-based tutorials out there.
#28
Quote from: Reave on Thu 26/10/2023 20:24:58Another doubt: I would like to use a bit strange resolution for my game: 1024x1024 for the "game space" and a bit more to make way for the classic Lucas Arts menu. I thought about putting 1024x1024 but the menu is placed on the background.
I thought then to put 1024x1100. My logic was that if I put more spaco below, the menu will go on the bottom but the menu doesn't seem to move. Is there an option to place the menu that I haven't seen?

I would suggest 960x1080, that way it at least matches Full HD vertically.
To move a GUI, change its "left" and "top" properties.
#29
Before the "web 2.0", most files were directly linked in the HTML source of a website. Current web apps use JavaScript code that loads these resources in the background using the fetch API.

However you can still find the requested URLs because just like before, the browser will download everything into its cache folder first.
You just need to open the dev tools (F12 in Edge/Chrome/Firefox) and check the network tab.

In the case of AGS web games it's even easier if you open the console tab (and turn on XHRs in the top right corner).
Opening the game URL will display the static URLs like this:



On Firefox at least you can now right-click these links and select "Open URL in new tab" and the browser should simply start the download (because it doesn't know the file type).
#30
Wordle 858 4/6

⬜🟨⬜⬜🟨
⬜⬜⬜⬜⬜
🟩⬜🟩🟨⬜
🟩🟩🟩🟩🟩

Bah.
#31
I created a test game with 3.5.1 and can confirm that the video track runs faster than the sound track. The video finishes about 5 seconds early, the screen simply stays black while the audio track plays to the end.

The same thing happens in the latest 3.6.0 build and 3.99. In VLC, the video is in sync.
#32
I cannot confirm this.
ResetRoom() does not change global variables.

In order to do what you claim, AGS would have to separately keep track of how each room script changes global variables and somehow undo this. This is not how it works though. AGS resets just the room state, for instance the coordinates of objects.
#33
Right, it needs to be a dynamic array I guess.

Code: ags
  int turnorder[] = new int[8];
#34
Try
Code: ags
  selectSortMax(turnorder, 8);
#35
The latest news about Elon ruining Twitter is he might close it for people in the EU because the EU is pretty strict about data protection and hate laws and whatnot.

Threads for instance is still not available here.
#36
Yes, the text is set in the VerbCoin script's repeatedly_execute. You could add a custom property, a bool "isFood" with a default value of false, the set it to true for each edible item. The rep_exe will read this property and set the text accordingly.

I checked your game and override inv click handling was still set to false. I changed that but left-clicking an item only makes it active, as opposed to opening the VerbCoin. So you'd have to also implement that somehow.
#37
Using a text property for this is possible but not recommended.
You can simply use global bool variables for this; create them in the Global Variables pane in the project tree, then refer to them directly in script:

Code: ags
  canFly = true; // skill aquired

You can now check for this at any point using

Code: ags
  if (canFly) {
    Display("You jump off the building and gracefully sail towards the hotdog cart.");
  }
  else {
    Display("You plummet to your death.");
  }


Anyway, here's how to do the string stuff:
Code: ags
  // check if string contains a character
  if (player.GetTextProperty("skills").IndexOf("C") > -1) ...

  // add a character to a text property
  player.SetTextProperty("skills", String.Format("%s%s", player.GetTextProperty("skills"), "C"));
#38
Here's how to toggle the visibility of a control:

Code: ags
void Toggle(this GUIControl*) {
  this.Visible = !this.Visible;
}

You can now do
Code: ags
  listBoxWhatever.Toggle();

I'm not sure how useful this is though, when dealing with multiple listboxes you'd usually want to explicitly set the visibility of each one.


As for accessing listboxes by their ID: each GUI has its own Controls[] array you can use for that:
Code: ags
  gBunchOLists.Controls[2].Visible = false;
  gBunchOLists.Controls[3].Visible = true;

Looking at your bio_text code, I think the best way to solve this is if you describe what your end goal is rather than your current process. Try explaining it in game design terms rather than AGS technical ones.
#39
So by "they don't work" you mean that the character doesn't disappear behind them? Like they didn't exist?
I assume you've double checked the baselines?

If you upload your source files and PM me a link I can take a look.
#40
The common causes are

- it's disabled
- one accidentally drew a region or hotspot instead

Does it behave as if you never created it? Or what exactly is the issue?
SMF spam blocked by CleanTalk