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

#261
Loving every update. I'm really looking forward to the game!

You're obviously putting a lot of effort and attention to detail into this and I think it will pay off well  :)
#262
Quote from: Stupot on Sun 28/06/2020 04:25:02
Drink responsibly, guys.

Or wear the  “Virus Away” necklace while drinking!  :-D
#263
You could probably also use a region and its walk on/off-functions.
#264
Also, right now the player could use any item to make the coffee. If you want them to only make coffee when using either the cup or the coffee on the coffeemaker, then add an extra condition:

Code: ags

function hCoffeMaker_UseInv()
{
  if (player.ActiveInventory == iCoffee || player.ActiveInventory == ICcup)  // <---
  {
    if(player.HasInventory(iCoffee) && player.HasInventory(iCcup))
    {
      player.Say("Giddyup!");
      sBrew.Play();
      Wait(150);
      player.Say("Oh boy, Coffee's ready!");
      sPour.Play();
      Wait(150);
      player.LoseInventory (iCcup);
      player.AddInventory(iCcupfull);
    }
  }
}
#265
Quote from: Retro Wolf on Sat 13/06/2020 20:17:51
One good thing about this lockdown is that I've been seeing more nature, walks and bicycle rides, I've been discovering new nature trails near to me that I didn't know existed and I've lived here my whole life. It costs nothing and is a bit of an adventure.

Same for me!  ;-D I discovered quite a few new places in the vicinity.
#266
You could also switch to another background frame of the same room that also contains a background image for the characters.

Edit: I'm still sure if you want small backgrounds for each character or one background for all selected characters together.
#267
Instead of doing this 50 times:

Code: ags
if [amy has been selected]
{
cAmy.ChangeRoom(6);
persoscolonie[nbpersoscolonie]=cAmy;
nbpersoscolonie++;
}
// and again for each of the 50 characters, so the 6 selected characters are identified and placed in room 6


..you should use the character's ID instead of the name. That way you will only need to write that part once.

Code: ags
if [character has been selected] //check the selected character's ID
{
character[selected].ChangeRoom(6);
persoscolonie[nbpersoscolonie]=character[selected];
nbpersoscolonie++;
}
#268
Looks functional, though instead of selecting characters or enemies via a GUI I would prefer clicking directly on them.
#269
Quote from: Pinosas on Mon 25/05/2020 14:36:02
However, when i run the game the audio only pops out when the character leaves the Hotspot, and not while it's inside.

That sounds weird, but I've never used the "Stand on Hotspot" event and would need to test it myself. You could try using a region instead of a hotspot though.

Quote
Besides that problem, I guess i should write another script to make the audio go in a loop (?)

audio.play has a RepeatStyle-parameter:

AudioClip.Play(optional AudioPriority, optional RepeatStyle)
#270
That's way too long, mine is 123.
#271
Looking good!
#272
I'm not quite sure what you're trying to do. Do you want to make a GUI with buttons instead of items? And instead of adding and removing items those buttons should turn visible/invisible? Why don't you want to use a regular inventory?
#273
You're welcome, I'm glad it works  :)
#274
Quote from: Racoon on Sat 25/04/2020 12:43:53
Now I can select items in the inventory and deselect them, BUT only if I right click on an other inventory item. So I think eMouseRightInv only gets called when the mouse is on an inventory item. What I want though is to deselect a picked item everywhere while the inventory is open.

Ah, yes, I was confused by this too and solved it by putting this in the global script's on_event function:

Code: ags

if (event == eEventGUIMouseDown && mouse.IsButtonDown(eMouseRight) && player.ActiveInventory != null && data == gInventory.ID) 
{
  InventoryItem *ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  if (ii == null)
  { 
    player.ActiveInventory = null;   // lose active inv
    mouse.Mode = eModeInteract;
  }
}

(replace gInventory in case your GUI is called something else)

I'm not at all sure if this is the most elegant way and I think scripting inventory stuff in AGS is a bit complicated. But it works :)
#275
That's weird, this should definitely work.

Are you really sure that MaatLooked is true? Just could check by putting this in the room's rep exe:
Code: ags

if (MaatLooked) lblDescription.Text = "true";
#276
Right, sorry. Of course you have to put it in the room's script (roll).

Glad it works now.
#277
Put both lines in the global script like this:

Code: ags

lblDescription.Text = Game.GetLocationName(mouse.x, mouse.y);
if (lblDescription.Text == hMaat.Name && MaatLooked==true) lblDescription.Text = "Maat"; 


Just for clarification:
The first line makes sure that the label called "lblDescription" shows the name of the location the mouse is hovering over.
The second line changes the name of the specific hotspot hMaat to "Maat" in case the bool MaatLooked is set to true.
(EDIT: to be precise: it doesn't change the name, but it changes what the label displays)

Please always say what exactly doesn't work, so it's easier to find the solution.
#278
1) Isn't this working?
Code: ags
String mytext = "Hello";
mytext = mytext.Append("World");
DisplayText(mytext);


2) You don't need a new gui for this but you'll change the text of the label you already got for the hotspot names. You might want to check out my answer in this thread (there, instead of a variable I check the object's changed graphic).

3) You'll need to check eMouseRightInv in the on_mouse_click function.
Code: ags

if (button == eMouseRightInv)  player.ActiveInventory = null;
#279
The Rumpus Room / Re: Nice game music
Sat 18/04/2020 12:17:36
childhood nostalgia:



#280
I've had trouble with this too.

Once I had a character sitting at one side of a table and the arms were supposed to rest on the table while the legs would be covered by a table leg. I solved this by making the table leg a different object and put it in front of the character.

I also had the situation with a character sitting behind a table with the arms on top of it. If I remember correctly I did what Ali suggested and cut out parts of the body that were supposed to be behind the table. But I think that's still a rather annoying and unpractical solution, especially if it's not pixelart or if the character is animated.
SMF spam blocked by CleanTalk