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

#22
Not sure what causes that issue, but you could try to do some debugging, like having a label that shows the player's current view, walk speed etc.

Also where is this code located, which function is it in? Is there any code before or after that snippet that might cause some conflict?
#23
AGS Engine & Editor Releases / Re: AGS 3.6.0
Sun 02/04/2023 15:44:18
Great work! Thanks everyone.
#24
Critics' Lounge / Re: Dude Where's my Keys?
Sun 02/04/2023 15:38:00
Overall I like it, but as the others mentioned the perspective is way off and that cought my eyes right from the beginning.

You have a weird two point perspective and I think you should have a one point perspective instead. The image would greatly benefit from aligning everything with that point. As mentioned we shouldn't see the top of the cupboards/microwave/fridge. The top of the doors would be angled too.


#25
If you select a walkeable area in the editor, you can edit the character scaling in the properties panel. If you set ContinuousScaling to true you can edit the min/max scaling of characters.

You can also do this via coding using character.Scaling.
#26
Something like this should work (untested). You have to make sure that all the characters that can collide have a consecutive ID.

Code: ags
int i;
int i2;

for (i = 10; i < 16; i++) // iterate through characters 10 to 15 (as an example)
{
  for (i2 = i + 1; i2 < 16; i2++) // iterate again without checking the same pair of characters again
  {
    if (character[i].IsCollidingWithChar(character[i2])) 
    {
      // character[i] and character[i2] are colliding
    }
  }
}
#27
Snarky, I think you misunderstood the question. I don't think Pax Animo meant that the collision detection seems random, but that random collisions are supposed to happen in the game and they want to find out who's colliding.


I started to write some code using arrays, but I was unsure how exactly you want this to work.
 
I guess there are a bunch of characters that can randomly collide with each other and the basic idea is to have two arrays that iterate through all the characters that can collide. But who should follow whom exactly, if two of them collide? Who should change their view and who's ID is supposed to be passed?
#28
I'll try to give more feedback after I have finished my second playthrough (I did the first one in the days after the release), but I just want to point out one QoL improvement:

It would be nice to directly see the amount of pills, food etc. when hovering the mouse over it in the inventory. Similar to the money in the wallet it could say "3x food" or "sleeping pills, 2 left"..

Anyway, great work with the game  :)
#29
You're absolutely right, sorry for the confusion!

In my game right-clicking in general removes the current item, so it seemed to work correctly with the inventory too, but as you said, clicks on empty spaces in the inventory aren't actually registered.
#30
Quote from: Crimson Wizard on Mon 13/03/2023 15:08:53on_mouse_click is not called when you click on GUI. eMouseLeftInv/RightInv are only passed when you click on items themselves (in case "override inventory clicks in script" is true), but not on empty space in inventory window.

Are you sure? I always considered the inventory handling in AGS a bit confusing, but I got this in my on_mouse_click function and it works perfectly fine. If I click on an empty space the current active inventory becomes null:

EDIT: Nevermind. This code does not run, i.e. the clicks aren't registered. In my game right-clicking in general removes the current item, so it seemed to work correctly.

Code: ags
  // right click on inventory
  else if (button == eMouseRightInv)
  { 
    // put item away
    if (player.ActiveInventory != null) { player.ActiveInventory = null; mouse.Mode = eModeInteract; }
    // look at item
    else inventory[game.inv_activated].RunInteraction(eModeLookat);
  }
#31
As a sidenote, an easier workaround might be to use two objects. To me it seems that you change the book object's graphic to a coin (as part of a transaction). Instead you could just disable the book object and enable a coin object.

Also I advice you to use object names instead of their numbers, e.g. oBook.Graphic instead of object[0].Graphic. This makes your code more readable and mistakes less likely.



#32
I will try it out later today!

Somehow it's a great timing, because the game will help me get through my first (and hopefully last) covid infection  ;-D
#33
This 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:

Code: ags
if (player.x > 200)
{
  GUI.Transparency = 100 - (player.x - 200)
  if (GUI.Transparency < 0) GUI.Transparency = 0;
}
#34
Quote from: Terminator2 on Wed 08/02/2023 00:43:26I can get it working for the most part but the animation doesn't work when I use the eNoBlock parameter. In other words, the librarian just stands there.

That's because you're calling the animate command over and over again, 40 times a second. In your code you don't check if the librarian's animation already started.

I came back to your first code and tried to change it to make it work. Aside from checking the animation I also got rid of the walked variable and tried to make the code shorter. It's untested though and I'm not sure if it (immediately) works.

Code: ags
if (TimerStart == true && !cLibrarian.Animating) { // only called after the librarian's animation stopped
    cLibrarian.UnlockView();
    location = Random(0); // Randomize 9 numbers
    TimerStart = false; // Stop timer from randomizing
  }
  
if (TimerStart == false) { // If timer is paused then send librarian to location
  if (!cLibrarian.Moving) {
    if (location == 0) {
      if (cLibrarian.x != 444 || cLibrarian.y != 229) { // send librarian to location
        cLibrarian.Walk(444, 229, eNoBlock, eWalkableAreas);
      }
      if (!cLibrarian.Moving && !cLibrarian.Animating) { // if he's not moving (anymore) and not animating (yet), animate him
        cLibrarian.FaceDirection(eDirectionRight);
        cLibrarian.LockView(39);
        cLibrarian.Animate(2, 5, eOnce, eNoBlock, eForwards);        
        TimerStart = true;
      }
    }
  }
}
#35
On 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.
#36
What does the error message say?
#37
Today it went smooth, though I could have completed it with two guesses.

Wordle 594 3/6*

🟨🟨⬜⬜⬜
🟩⬜🟨🟨🟨
🟩🟩🟩🟩🟩

Spoiler
STERN
TOAST
TASTY

..too bad I decided against tasty and used toast as the second guess.
[close]
#38
Great news! I'm looking forward to it.
#39
AGS Games in Production / Re: REBOOT
Tue 31/01/2023 08:54:50
Nice! Good luck with the development.

Your art style is getting better and better (though the perspective in the last image is way off  ;) ).
#40
Quote from: eri0o on Fri 27/01/2023 21:57:24In my experiments with it, it makes too many mistakes still, often mixing AGS Script with some other languages (C, C# or JS), and also AGS API with other apis (even Game Maker stuff).

Definitely. You should treat the output as pesudo-code rather than actual AGS script. I think the chatbot can be helpful when it comes to a general code logic though.
SMF spam blocked by CleanTalk