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 - Crimson Wizard

#2641
Unfortunately it's been too long to remember anything particular about 3.4.1.

One thing that I would test is which audio driver they have selected in setup. I recall there was a driver selection on Windows, and some choices could work not well, causing sound corruption etc.

Another thing, that version should have a "threaded audio" checkbox, is it on or off, and will there be any difference?
#2642
I expanded the Camera and Viewport articles with practical examples and minor additions; they are not published in the official manual yet, but may be read in the wiki source:
https://github.com/adventuregamestudio/ags-manual/wiki/Camera
https://github.com/adventuregamestudio/ags-manual/wiki/Viewport
#2643
Strictly speaking, the above code may be simplified, as you already have X coordinate that you may use in a condition:
Code: ags
while ( Game.Camera.X > X_DESTINATION ){
  Game.Camera.SetAt(Game.Camera.X - 6, Game.Camera.Y);
  Wait(4);
}

Or simplified even more:
Code: ags
while ( Game.Camera.X > X_DESTINATION ){
  Game.Camera.X -= 6;
  Wait(4);
}

Naturally, vertical movement will require changing Y instead; and moving in opposite direction will require adding instead of subtracting and testing for (Camera.X < X_DESTINATION).
#2644
On one hand, the custom dialog options rendering may allow to make any part of the screen interactable. You decide and script yourself where on screen player may click and what happens.

One problem with this approach is that, because of how AGS script works, you won't be able to run certain functions or events directly. For example, a quick test shows that while it's possible to run hotspot's interaction out of the dialog script, it won't work if you try running it from "dialog_options_mouse_click" and similar.

A workaround could be to have a dummy hidden dialog option (or a number of these), which you run following a click over a hotspot. You will have to save a hotspot reference in a global variable, and use that to know which hotspot was meant to be interacted with. Alternatively, of course, if a dialog is room-specific, you may have a separate dialog option per hotspot, and run corresponding option. The choice mostly depends on what kind of action do you like to have as a response to clicking over a hotspot.



Another approach would be to avoid AGS own dialog options altogether, and script a completely separate options system, running in e.g. repeatedly_execute, drawn on a regular GUI, for instance.

With this approach the main problem will be... lots of scripting. Also, you will need to be able to run necessary dialog option. As AGS does not let you directly start certain option, but only start a dialog itself. This in turn may be worked around by temporarily disabling all options except the one you need to run - that will force AGS to run that only available option on dialog start.


EDIT:
Quote from: Pax Animo on Tue 20/09/2022 20:21:51Try setting Run game loops while dialog settings are displayed option on General settings page.

Though I'm not sure this allows hotspots/objects as clickable.

No, it won't allow that. During dialogs any clicks are intercepted by the dialog system.
#2645
I noticed that typing any words with a dot between them will create a hyperlink in post. This may be annoying, as one may be writing a AGS script or other programming language expressions which may contain dots between names.

Example: Game.Camera
#2646
We need better code examples in the manual... because currently it has none.
Also I just realized that Camera's article does not mention the Game.Camera object, so there's no obvious connection.
#2647
Quote from: Slasher on Tue 20/09/2022 14:12:54i need to the screen to show whole room with the char at the bottom in lift.  Room scrollable is 300wide  x 820high....

Do you mean that you need to move the camera up, or zoom camera out to show more of the room at once?

Regarding old functions (GetViewport and so on), if you search for them in the manual, their description has a note that tells which functions to use instead.
Also, there's a table of outdated functions, which tells the replacements:
https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html
#2648
Quote from: eri0o on Sat 17/09/2022 21:00:37
Can you point me to a version that had this said brace highlighting? I just tested the latest 3.5.1 and it doesn't have it afaict.

It works for me in 3.5.1. EDIT: to clarify, this works with the round braces around function parameters, not curved braces around a block of code.

For example, if you type "func(asd)" the braces will be highlighted yellow the moment you place second brace. If you type "func(asd))" the third brace will be highlighted with red.
#2649
Quote from: skooperstooper on Sat 17/09/2022 03:12:05
Should previous coordinates carry over to the next room the character changes to or shouldn't it? What is supposed to be the default behavior in AGS?

The default AGS behavior is that if no coordinates are given in ChangeRoom command, the current character's coordinates are carried over.

Characters do not remember "per-room" positions, they only have one current position and nothing else.
#2650
Quote from: rongel on Fri 16/09/2022 11:10:33
In 3.5.1 version stereo clips worked fine when panning. I can change the clips that require panning to mono, but ofcourse it would be great to have that functionality back again. Any news about this issue? Should I just go with the mono versions?

Overall, the stereo sounds and panning seem to contradict each other, because stereo already defines by itself which track to play from which direction.
The panning of stereo clips that was implemented in the old engines was not a real "panning", technically, but a balance shift, which is a different kind of effect. This may be proved by making a stereo clip that has two different tracks in two channels: when panning in 3.5.1 (and earlier) you will notice that one track will loose the volume while other will gain it, instead of moving whole combined clip in the 2D space.

I don't think that this will be restored in this version; it may be restored in the later updates (patches) if it's found that this is necessary for backward compatibility when running old games. Additionally this "balance" effect may also be implemented properly on its own, with respective command, at some point in the future.

As for properly panning the stereo sounds, this may only be achieved by converting them to mono, either when you create assets, or by the engine itself; although in the latter case the problem is that engine will need to know when the sound is supposed to be panned. If there's no such indication, then it might have to do so dynamically when the clip is commanded to pan, which might add to the program's CPU load.

Quote from: rongel on Fri 16/09/2022 11:10:33
+ One small extra gripe, but I also miss the yellow auto brace highlight when writing code. Other than that, everything seems great!

Can you clarify this? We've upgraded the library behind the script editor, and some things may still not be fully restored, but I think it's a matter of adding a fix or two.
#2651
Quote from: Slasher on Thu 15/09/2022 19:48:39
Each int gets displayed on it's own Label one by one. The main label displays them as the occur and adds them up on the fly.

If one by one, then you need to have as many %d as you have ints:

Code: ags

LMoney.Text=String.Format("%d, %d, %d, %d", Willis_Bank,  Meyers_Bank,  Mercer_Bank,  Guthrie_Bank);
#2652
Do you need to display four ints one by one or display a sum of 4 ints?
#2653
Please note that if the perfomance is the issue, you may consider writing a C/C++ plugin instead. Plugins may request bitmap surfaces for dynamic sprites (and room backgrounds too, iirc), and work with them directly, free from the script API overhead.

https://adventuregamestudio.github.io/ags-manual/EnginePlugins.html
https://adventuregamestudio.github.io/ags-manual/EnginePluginRun-timeAPI.html
#2654
Quote from: skooperstooper on Wed 14/09/2022 18:10:08
I currently have all of the assets for it in a subfolder of the folder AGS created for the project

Would copying the project folder be enough then?

Mostly yes.

If you want to save disk space:
You don't need to copy _Debug and Compiled folders, as these are recreated when you compile the game.
You don't need to copy AudioCache folder if all of your audio source files are also in some subfolder inside the project. Otherwise you must keep it.
#2655
Quote from: The creature on Tue 13/09/2022 06:17:00
So the struct is being declared in another script above the Global Script and I'm displaying the information in the repeatedly execute of the Global Script.

Can you set the breakpoints in both places to double check that the assignment happens earlier?
In general, if that's a script logic error, this may be fixed by testing whether Name is null before assigning it to the label.

Quote from: eri0o on Tue 13/09/2022 01:48:14
@The creature Which AGS version are you using? (I remember  AGS 3.6.0 - Beta 4 had the data disappearing bug, but it was fixed right after)

Right, there have been a bug in the past, where the Strings were disappearing, but I think that was related to saving and restoring a game.
#2656
So, this sounds like a problem of value not saved into the struct.

Are you assigning this to a label in the same script where you set the default value, or these are different scripts?

How do you declare this in the script header (import)?

Do you double check that the game_start function runs and the array members get assigned?

#2657
The error "formatting argument 1 is expected to be a string, but it is a null pointer." you were getting with String.Format is likely because Name was not assigned anything yet, so it equals null. String.Format does not like that.

By the way, in this case it looks like you don't need formatting at all. Both Label.Text and readyCreature[0].Name are strings, so they may be assigned directly.

Code: ags

LStable1.Text = readyCreature[0].Name;


Unless the above code is not a real code, while in real code the label contains more information besides the name.
#2658
Quote from: .M.M. on Mon 12/09/2022 19:55:44
The plugin looks really cool and useful, but fore some reason, all my dialog text got wiped out. In every dialog in the project. The options were not affected, everything else is suddenly blank. I'm using AGS build 3.6.0.31 if it helps.
I have some backups, so it should all be okay, but I'm not sure whether someone reported this or had similar problems.

There have been a bug in 3.6.0 which caused this, please make sure you're using the latest update of 3.6.0.
#2659
Since AGS 3.6.0 you may also import variables from lower scripts too, but the import declaration must be higher than the usage anyway.
You may even place import declaration inside a script's body.

For example, if you have scripts like
- MyCutScenes
- MyVars

and you have global vars in MyVars, then you may make them available in MyCutScenes without changing script order, if you declare their import second time inside MyCutScenes.asc. This will make MyCutscenes.asc "see" them.
#2660
You may also use "Display" command for quick debug, see if they display anything on screen in these places, to make certain that these functions run at all.
SMF spam blocked by CleanTalk