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

#21
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!
#22
The virus thing has been discused before, it's indeed a false positive (at least the majority of cases). I think I remeber that it has to do with the engine accesing to the .exe repeatedly (or something like that). From memory, one of the solutions is in General Settings>>Compiler set "Attach game data to exe" FALSE. But sure Crimson Wizard knows more about it. 
#23
Quote from: Crimson Wizard on Tue 21/02/2023 20:08:58This was done in the experimental branch, but now added to 3.6.0 in the latest update.
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-release-candidate-rc1/msg636653570/#msg636653570

Wow thanks, CW! I'll be testing it. I'm on 3.5.1 but that's an excellent reason to "migrate" to 3.6.0.
#24
If I understand you correctly: for the textbox you have to create a new text GUI (in the GUI's option on Explore Project). And in Game Start function (At Global Script) set that text windows GUI. For example: "SetTextWindowGUI (X);" where X is the number of your text GUI.

For the portrait: in General Settings, Speech Style: SierraWithBackground. Later you have to set a Speech View to your character(s).

I recomend you to read the AGS Manual.

#25
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.   
#26
Quote from: Snarky on Mon 13/02/2023 07:29:17There is another small improvement we can make in case a particular problem arises:

If the character movement is linked to animation (often called "anti-glide"), and the character movement speed (the distance it moves per animation frame) is large, and the animation delay is significant, then the fade-in effect could appear "jerky," with sudden jumps in transparency.

Specifically, this could become noticeable if AnimationDelay > 2, and 100*MovementSpeed/(endX-startX) >= 2 (but especially if it is some higher number like 4 or 5).

Thanks, Snarky! Since my character's movement speed is 8 and AnimationDelay is 4 (and that without counting that the character can run if user double click/ hold shift) the improvement is very welcomed.


#27
Yeah, we can agree on that. But as English isn't my first language sometimes i'm afraid of sound rude when isn't, always, my intention.
 
Quote from: Snarky on Mon 13/02/2023 06:51:59Note that we don't use player.Moving or any kind of loop: the transparency is directly tied to the character position, so it will automatically update as the character moves. And therefore we don't need any Waits or anything like that: the mapping of the position to transparency ensures that it fades in to reach full opacity only when the character arrives at the target X.

Wow, Snarky that's exactly what I wanted to do. Many thanks!
#28
Quote from: Snarky on Mon 13/02/2023 06:18:21"it doesn't work,

First of all: I never said Khris code doesn't work wich would be disrespectful. I only use the phrase doesn't work with my own code (I have the right to be disrepectful with myself  :-D). And later in my first reply I have done just that: explain what it does and how it differs from what I want to happen.

Yes, I know put a Wait on rep exec function isn't the best idea, that's why I call this a workaround and not a proper solution.

That's being said... I have been adapting the number of Khris code to my coordinates. But I couldn't get the desired effect. Many thanks anyway, Snarky!
#29
Quote from: Snarky on Mon 13/02/2023 05:59:57The only issue I can see with it is that depending on your animation speed

That's the key. With Khris code as is, the GUI becomes solid very fast. With my workaround (that involves Khris code) the GUI becomes solid more slowly, which produces a more dramatic effect.

#30
Well, I found a kind of workarround...

I create a Variable: int movement=100.

and in Room_RepExec:

Code: ags
if (player.Moving)
{
  Wait(10);
  movem--;
  }

 int tr = movem; // Khris code :-)
  if (tr < 0) tr = 0;
  gDark.Transparency = tr;

Not exactly what I had in mind, but close enough I guess.
#31
I was thinking on define the starting point (A) and the ending point (B) of my character's walk and assume that A is at (x1) and B is at (x2). And later write a script that will "read" my character moving from A to B and adjust the transparency of gDark along the way.

For example, something like:

Code: ags
 int x1 = 100;
 int x2 = 200;
 
 int steps = 100;
 
 int dx = (x2 - x1) / steps;
 
 for (int i = 0; i < steps; i++)
{
  if (player.Moving && x1 + i * dx)
  
  {
     gDark.Transparency = 100 - i;
  }
}

But, of course, that doesn't work neither  :-D
#32
Quote from: Matti on Sun 12/02/2023 12:43:25This depends on how you want it to work exactly. Should the GUI only become more visible while the player walks and should it immediately become invisible again if the player stops?

You could link the transparency directly to room coordinates, like this for example:

Thanks for the reply, Matti! Surprisingly your code is very similar to my first try, but for some reason as my code doesn't work I go for other stranger paths.

Quote from: Khris on Sun 12/02/2023 13:57:42while is used to create a loop (...)

Thanks for the explanation, Khris!

Quote from: Khris on Sun 12/02/2023 13:57:42A use-case for that is a blocking cutscene where the camera pans across a room.

Yes, I used it (instinctively, but without fully understanding it) when I need to pan the camera across the room at Intro.

Quote from: Khris on Sun 12/02/2023 13:57:42AGS has the three repeatedly_execute functions

Yes, I knew that  :-D  But, for some reason, I was confused about what exactly while does.

Well, I undestand what your code does, but I realise I didn't explain myself well. What I want to do is that the GUI appears slowly as my character walks from A to B, being A gDark.Transparency=100; and B gDark.Transparency=0;. But in the middle of the path from A to B, gDark should has a range of transparency (99, 98 ... 1, 0). So the effect is that the gDark appears very slowly while the character walks up to the B point (a region that trigger an event).   
#33
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!

#34
Quote from: Khris on Mon 06/02/2023 21:33:34Yeah, my bad; .TopItem is an integer. I fixed the code in my post :)

Thanks Khris! It works like a charm!  :)

Now that you said it, it makes sense that .TopItem is an integer.
#35
Quote from: Snarky on Thu 02/02/2023 10:44:01I would also add:

-each time the player quits/exits to main menu/brings up the main menu

The only little wrinkle is that you should then ensure that when the game is loaded, it doesn't start off with those menus open. You can do this by closing them in on_event(), inside a check if(data==eEventRestoreGame).

Agree. That's what I do in Another Museum (my MAGS game).

In GlobalScript I create a bool

Code: ags
 bool QuitTheGame = false;

Then in Repeatedly Execute Always I put:

Code: ags
if (QuitTheGame)
      {
        QuitGame(0);       
       }

And made a function on event:

Code: ags
function on_event(EventType event, int data)
{
  if (event == eEventRestoreGame)
  {
    gQuit.Visible = false;  //My quit the game GUI
    QuitTheGame = false; 
  }
}

And last in the On Click script of the button of "Quit" in my quit GUI:

 
Code: ags
gQuit.Visible = false;
      QuitTheGame = true; 
      SaveGameSlot(1, "AutoSave"); 
#36
Quote from: Khris on Mon 06/02/2023 10:53:26You can use this

Thanks for your time, Khris. But it's weird. I write the code inside the function as you said:

Code: ags
function btnInvDown_OnClick(GUIControl *control, MouseButton button)
{   
     InventoryItem* ii = invCustom.TopItem; 
  invCustom.ScrollDown();
  if (ii == invCustom.TopItem) aStuck.Play();
  else aScroll.Play();
}

and I get this error:

GlobalScript.asc(534): Error (line 534): Type mismatch: cannot convert 'int' to 'InventoryItem*'

I'm confusing about what is happening to get the Type mismatch: cannot convert 'int' to 'InventoryItem*' error  :-\

Quote from: Matti on Mon 06/02/2023 11:30:36On a side note: As a player I find it convenient if the arrow buttons already indicate that there are no more items in one direction.

Yes, it's a very good idea too. Thanks  :)
#37
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!
#38
I've just bought it yesterday, via Steam, so I only played a bit. But it's looking very good so far!
#39
Sorry if I'm reviving an old topic but I have a strange issue with the module: When I press Down/Up arrow keys (or W/S keys) the game crashes:



With "Left/Right" or "A/D" there isn't problem the player moves well. I suspect it has to do with the loops of my player view but I donĀ“t know well what's happening here.

#40
For your consideration:

Imagen67" border="0

A little first person point'n'click adventure game
Created in three weeks for MAGS competition (theme: Museum)








PLOT

A Monstuano suddenly comes to the Non-Living Entities Redirection Office. And that means... troubles. The eternal intern of the office will try to get some specific items to complete the ritual that will lead the Monstuano to his respective paradise.

FEATURES

- English and Spanish language
- Original (dynamic) Music made by me
- Some freesound.org effects
- Hidden Objects, Pixel Hunt and Weird riddles puzzles
- AI generated portraits (with different expressions)
- Backgrounds photos manipulated by hand with Paint Shop Pro 7 (1999)
- A short experience
- Autosave

PLEASE CONSIDER FOR:

MAGS of the Year (It's not my favorite even, but... why not?)
Best Short Game (I's short indeed)
Best Writing
Best Character (the boss?)
Best Gameplay
Best Background Art (well... no, but I manipulate the photos with a 90's tool  :-D )
Best Original Music & Sound Design (I put an effort with the dynamic music)
Best Programming (Well...)
Best Puzzles (Well there are one or two puzzles on it)
SMF spam blocked by CleanTalk