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 - morganw

#1
I would guess that your boolean flags are not being set correctly. The code which you've shown doesn't look it would work:
Code: ags
        if(GetLocationType(context_x, context_y) == eLocationObject)
        {
          Hotspot* h = Hotspot.GetAtScreenXY(context_x, context_y);
If no flags are set unless the context position is over an object, how can it work where there is no object?
#2
'control' is a pointer to the button.

You should probably also include the fix for checking which GUI owns the button:
https://www.adventuregamestudio.co.uk/forums/index.php?msg=636657503
#3
If the image was not actually a first person view, but just a camera angle, you could mask parts of the image and reveal them as the (invisible) player moves into a position where they could be seen. Or to put it another way, a portion of the image represents the players location, rather than the entire image.

e.g. when on the stairs you just show the stairs, after descending the stairs you reveal the chest and mask the stairs

You could also render the previously visited parts of the image in grayscale to indicate that they have been visited but do not represent the current location, so each move still causes a visible change on the screen.
#4
I don't think it is an issue of compression, it is more an issue of alignment of the data. Wave files have their own issues so a .wav file isn't a good test.

I converted your file to .ogg and it loops with no problems when I've tested it:
au000003.ogg

Quote from: tinytim42 on Tue 19/09/2023 14:25:16I also tried to put it into an AudioChannel and then use channel.SeekMs() to bring it back to the beginning when it reaches the end of the file
This approach will not work because the scripting commands won't run often enough to stay in sync with the end of the audio playback. You need to do it the first way that you tried (usinge eRepeat).
#5
I'm fairly sure that there were previous issues which were specific to the VMware mouse integration, although this was when AGS was using Allegro.

Do you have an option to disable the VMware mouse integration and just lock the mouse input to the VM window?
#6
It looks like the mistake was in the part of the code that updates the text label at the bottom of the screen. You should be able to fix it by changing line 504 in VerbCoin.asc
from:
Code: ags
      else if (control != null && control.AsButton != null && control.Enabled && context_text != null)
to:
Code: ags
      else if (control != null && control.OwningGUI == interface && control.AsButton != null && control.Enabled && context_text != null)

https://github.com/adventuregamestudio/ags-template-source/commit/2337ff1fff54681d3ae67c221fc4584ee22b4900.patch
#7
I'll try to look at it over the next couple of days and make a fixed version.
#8
It might be a mistake in the VerbCoin code that it does not verify that the GUI button being clicked is actually one that is used by the VerbCoin.
(It was me that [re]wrote it, but it was a while ago and I'm not sure many people have actually used it in a game).

Do you have other clickable GUI buttons showing at the same time that the VerbCoin itself is showing?
#9
Quote from: Nahuel on Sat 26/08/2023 19:07:23I run it locally and it generates a {GameName}.tar.gz but strangely when running with @Honza there was no tar file generated at all with a "successful" execution summary.

I did it manually it was a very simple change, just +x the permissions to the main executable and data/ags32 and data/ags64

Normally it will generate the tar under the same linux compiled folder (apparently)
It writes the file to the current directory.
In the screenshot the current directory was "C:\AGS 6".
#10
Quote from: Honza on Thu 24/08/2023 18:32:41But then it turned out the files were still not executable, not sure what I did wrong.
The output of the script is the list of files and their permissions as they are added to the archive, and everything looks to be correct.

At a guess, you were either looking at the wrong file (in your example it would have been created in the directory "C:\AGS 6") or someone has tested the wrong file.  If you still have the file that the script generated I would be happy to have a look at it.
#11
Quote from: RootBound on Wed 16/08/2023 02:54:24Evidently Ctrl+[ is being received as keycode 27 which according to the table at https://adventuregamestudio.github.io/ags-manual/Keycodes.html is Escape. This explains why the game is pausing since Escape is one of my chosen pause keys. But why would Ctrl+[ trigger escape?

It isn't a weird AGS thing, it is a weird legacy thing from the way some (non-printable) characters needed to be entered on old terminals. For example, CTRL+m is the same as pressing the return key, CTRL+h is the same as pressing the backspace key, and CTRL+i is the same as pressing the tab key.
#12
Quote from: Gal Shemesh on Sun 20/08/2023 12:27:13I also just checked the code I posted here again and you're right, I forgot to add closing 'double-quotes' in the 'Display' function strings when writing this example, but that's all. I just fixed it above as well. But apart from that, the code logic is real - taken directly from a working game in AGS 2.72.

I'm not saying it would not originally compile, but you can see from your GIF that the check for AirConditionerFix==0 will only run if AirConditionerFix has a value of 1.  The edit you are making is changing what the original code does, to always check for AirConditionerFix==0.
#13
Quote from: Gal Shemesh on Sat 19/08/2023 17:26:51Only after putting a closing curly bracket at the end of the first 'if' statement and removing one from the end of the hAirConditioner function that it works in AGS 3.6.0.

The position where you are implying the opening curly bracket is optional can never be optional,  withouth it the logic of the function is changed to only check if the value is 0 if value was 1. Even if the previous scripting behaviour was to automatically close open blocks at the end of the file (adding missing closing brackets), it does not make sense for the example.

If you indent the code relative to the opening and closing of blocks then it will help to show that "Scenario 2" can only occur within "Scenario 1".

Code: ags
function hAirConditioner()
{
  if (AirConditionerFix==1)
  {
    Display("Scenario 1");
    if (AirConditionerFix==0) // <-- This is valid but probably does not make logical sense.
    {
      Display("Scenario 2");
    }
  // <-- The missing curly bracket to prevent an error goes here.
}

What you are describing as a fix (adding and removing a bracket) is rebalancing the brackets, whereas the example you've given is missing a bracket, so I'm not sure your example is real. The code you have shown will never compile regardless of what you do with brackets because the string quotes are never closed (I've fixed it in the example posted above).
#14
 Which version of AGS are you using?
#15
It should now reappear in the next build of AGS 3.6 as "Replace sprite using previous files...".
#16
Thanks for clarifying, I see what you mean.

It might be possible to add it back, based on using the first (or last) image of the previously used set of files. I've opened an issue here: https://github.com/adventuregamestudio/ags/issues/1911
#17
Quote from: Knoodn on Thu 02/02/2023 00:10:50When I have revised a series of sprites (without a linked source file) and use the option "Replace sprite from file..." for each sprite, I have to scroll through the files list again and again to open the same file.
I'm not quite sure that I follow this part. When you have revised a series of sprites doesn't that mean you have made changes to a series of files. Why would re-using the same file be useful in this context? Do you mean that you just want the selection to default to the previously used source directory?

Quote from: Knoodn on Thu 02/02/2023 00:10:50
QuoteJust to check though, are you looking to set the same single source file for multiple sprites?
But that would also be interesting. Is it possible?
It is just a reference to a file and I don't think there is any type of validation, so you could do that if you wanted to. You can also edit them in bulk by modifying the XML file that stores the references, as long as you are careful to not change anything else.
#18
I think it was probably removed because there would be a potential mismatch between the tile settings, animation frames (potentially a single file has multiple images in it), and whether the previous selection included multiple files (technically there is not a previous file there is a previous set of files).

Assuming you aren't using the tiling, in AGS 3.5 you can export all sprites that have a missing source file and set the sprite to reference the newly exported file. In that way you can replacements for the original source images. The export dialog box is a little cryptic, you have to right-click the Filename and Directory fields to get the list of tokens you can use for exporting, but I think it should work to bulk replace the source fields.

If you aren't interested in the source file then you can re-use a previous sprite by keeping it in the clipboard.

Just to check though, are you looking to set the same single source file for multiple sprites? Or are you looking to replace a sprite by having the "import sprite" window open with the previous selection of files and do something from there?
#19
If anyone would like to try it, here is an Emacs major-mode for editing AGS scripts:
https://git.sr.ht/~mew/ags-mode

I've not done much testing with it at the moment but it should provide syntax highlighting and structural editing derived from the built-in C-like language support.
SMF spam blocked by CleanTalk