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

Topics - glurex

#1
I have a scenario where I need to play a sound every time the player collides with ANY object in the room, not just a particular one. I have a code that executes repeatedly and accomplishes this perfectly, but only with specific objects.

Is there a way to achieve the same result with every object in the room using the IsCollidingWithObject function? That way, I can write a single function that works globally in every case.

PPCollision module have a function named "CWithAnything" that does exactly this, but I have problems with the module (maybe because it's old).

Thanks!
#2
Last year, I created a small silly game for MAGS in a few weeks. Although it wasn't my first game made with AGS, it was my first "published" game (now I'm working on two more titles). While watching the video that Stupot kindly recorded for the MAGGIES 2022, I realized (among other things that I have fixed now) something weird: in one of the rooms (Roman room), we have a board with many items that we have to find. As a hint system, I made it so that when the name of the object is clicked, an image of the item appears (and when the name is clicked again, it disappears). That image(s) is/are also a GUI, just like the item names on the board (yeah, a label would be better). However, I noticed that when someone clicks on another name (without clicking again to make the previous image disappear), the previous image remains and the effect is pretty awkward. I'd want that when one name is clicked and the previous image remains, that previous image dissapear before that make the other visible.

Here's the video (courtesy of Stupot) at 24:10:


I was thinking of possible solutions... maybe creating an array and assigning each item name (which is also a GUI) a position in the array. But I can't find a way to do it.


Thanks!
#3
Hi everyone!

I was trying to do what is on the title. I have a text label (label3) inside a GUI that says "Interact", and I want that when the cursor is over that label the label change its text to "Select" but, when the mouse leaves that label, I want it says "Interact" again.

I thought in using GUIControl  to get the mouse coordinates with GUIControl.GetAtScreenXY(mouse.x, mouse.y). But I have a problem because the text remains fixed in "Select" even when the mouse leaves the label (instead of change to "Interact" again).

That's my faulty code:

Code: ags
GUIControl *guicon = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
Label *lab;

  if (guicon != null) //Mouse is on the label
  {
    lab = guicon.AsLabel;
  }
  if (lab != null)
  {
    if (lab.OwningGUI==gInfo)
    {
      Label3.Text="Select";
      }
    }

Maybe there's a more efficient way to do that. I guess I'm complicating things  :) .

Many thanks!
#4
I wasn't sure where to post this, but I guess this is the right place.

It's a triviality, very low priority request. But I'd want to know if there's a posibility to make System.Gamma works on windowed mode (for now this only works on MS Windows FullScreen). IDK if that's a hard thing to do (or if it's even possible), but I leave this request for future.

Thanks!
#5
This maybe it's a silly question but... Is there any way in game to set VSync true/false with D3D9 or OpenGL? (System.VSync only works with Software Render)

I know I can set this from the editor (Default Setup), but it would be nice if the user can change it via a GUI inside the game.   
#6
I was wondering if there's a way to link the character movement, for example, to the properties of a GUI (like its transparency). So while a character (the player) walks in X axis coordinates a GUI could slowly became visible (from 100 to 0 transparency). Or even a Music could slowly became more loud.

Maybe with a while condition?

Code: ags
While (player.moving? player.x >Screen.Width / 2?)
{
GUI.transparency--;?
}

But i'm sure I'm not understanding how while works.

Thanks!

#7
Hi everybody!

It's kinda hard to explain, at least to me... But here we go:

I have an inventory that displays four inventory items "per page". This inventory has two buttons for scrolling purposes (the classical btnInvUp and btnInvDown). I have asigned a sound to each one so when I click one of them it sounds a scroll sound.



But I want to play a sound (scroll sound) when there is more items in the next "page" to show and another sound when there isn't more items (stuck sound). Similar case when I have less than 4 items, it should sound "stuck" in both ("<" and ">") buttons. But if I have, for example, 5 items it should sound stuck in "<" and sound scroll when I click on ">" because there is a new "page" with one item.

For example in this scenario, if I click the right btnInvDown (>) it must sound a "stuck sound" because there isn't enough items:



I belive I have to code with "InvWindow functions and properties", and "ItemCount"/"ItemsPerRow"/"RowCount". But I have not find the right way to do that. Bearing in mind I don't know yet how many inv items my game will have.

Many thanks!
SMF spam blocked by CleanTalk