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

#1
Quote from: Crimson Wizard on Thu 20/03/2025 20:38:27First of all please clarify: does it play fine when you open it by a video player program?
In other words is the problem in video or in how AGS plays it?

Then, how does AGS compare to the external video player? Does the image run same speed and sound becomes slower, or does the sound run same speed and frame changes become faster?

One known issue is that the video player in ags skips "black frames". This is mentioned in the two older conversations:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/how-play-two-videos-one-right-after-the-other/msg636661268/#msg636661268
https://www.adventuregamestudio.co.uk/forums/advanced-technical-forum/problems-with-ogv-video/

I've checked the video in two different media players, and it plays as intended in both. I also looked again at how it plays with AGS
and it definitely doesn't skip any black frames because I can still see the smooth fading-transitions (otherwise they would be interrupted somehow).

The thing is, that the video seems to get slower, not faster and the audio sounds fine to me :S
#2
Hello, it's me again :) I've created a video (ogv) and would like to use it as an intro sequence at the beginning of the game. It starts as intended but for some reason the video and the audio aren't in sync and and it gets worse the longer the video runs. Is there a way to fix this?

The code I use is:

Code: ags
[code]PlayVideo("Introsequenz_v01.ogv", eVideoSkipNotAllowed, 0);[code]

I use it in the global script at the beginning of the function:
[code=ags][code]function game_start()[code]

Thank you in advance! :)
#4
Thank you, the inventory closes properly now!^^ But I still can't pick any item from my inventory. When I leftclick, nothing happens (normally the item should stick to my cursor from then, right?) :S
#5
Quote from: Crimson Wizard on Wed 26/02/2025 17:26:17
Quote from: qinzha on Wed 26/02/2025 16:57:47Ok where am I supposed to paste the code? Because if I paste it into the globals script and try to call it in the first room, it gives me the following error:

How to export global functions to the room scripts:
https://adventuregamestudio.github.io/ags-manual/ImportingFunctionsAndVariables.html

In this case following line has to be added to GlobalScript header:
Code: ags
import function TransferInventoryTo(this Character*, Character* other);

Omg that works thank you!
But for some reason I can't interact with any of the objects inside and as soon as I close the inventory I also cannot move or interact with anything anymore :S
#6
Quote from: Khris on Wed 26/02/2025 12:26:22If the characters are supposed to have a shared inventory, you can transfer all the items, like this:

Code: ags
function TransferInventoryTo(this Character*, Character* other) {
  for (int i = 1; i <= Game.InventoryItemCount; i++) {
    other.InventoryQuantity[i] = this.InventoryQuantity[i];
    this.InventoryQuantity[i] = 0;
  }
  UpdateInventory(); // this unfortunately resets the order of the items to the editor's
}

Now you can call
  cAbby.TransferInventoryTo(cBarney);



Ok where am I supposed to paste the code? Because if I paste it into the globals script and try to call it in the first room, it gives me the following error:

"room1.asc(12): Error (line 12): '.TransferInventoryTo' is not a public member of 'Character'. Are you sure you spelt it correctly (remember, capital letters are important)?"

Is there a class for characters somewhere, where I need to paste it? Because it sounds a bit like the class doesn't recognize the function yet
#7
Quote from: Khris on Wed 26/02/2025 11:14:55you should tell us how you want this to work in your game.

Oh damn, I didn't expect each character to have their own inventory. I thought player is player, no matter who the current player is O_O

The plan is that both characters share the same inventory and the player can't switch on their own. After the player has completed certain quests, the character is changed automatically and you play the next passage as Abby.

Did I understand correctly that I don't have to manually check which character is currently the player when changing rooms, because AGS automatically retains this and I only have to set the desired spawn coordinate? And does AGS automatically remember that the non-player character follows the player?
#8
Quote from: Khris on Tue 25/02/2025 23:12:45Everything looks fine; not sure what's happening. If you upload your source files and post the link, we can take a look.

Okidoki! Thank you all very much for your help so far! :)
https://we.tl/t-5L8EDpwFi0
#9
Quote from: Khris on Tue 25/02/2025 16:35:00Just to clarify: you cannot see any items in it *in-game*, right?
Because the editor won't show them.

Yes I mean ingame :D I can open the inventory as intended but it is empty, although 3 items should be displayed
#10
Hello there,
this is my first game with AGS and I'm having some problems with the gInventory.

I'm using the VerbCoin template and when I started my project, I've changed the game format to 16:9 (1920 x 1080px). Also I'm trying to use the default GUIs and just change their appearance. All the GUI settings seem to be the same as the defaults (except the scaling, background image and position), but for some reason I can't see any items in it (they are already set so the player has them from the start).

The size of the invCustom (298 x 366) is bigger than the size of the items (54 x 54) and I have already copied and pasted the original inventory-code from a new project into the global script just in case. I have not been able to find any solutions yet. Does anyone have any idea what I might have done wrong?

Screenshots:
https://1drv.ms/f/c/02ed179c0667423d/EpOowc7APUBLvpfWL7LllH0BZs8pw4Hzysxq9vW2anosbA?e=pkH5GS

Thank you! :)
SMF spam blocked by CleanTalk