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

#341
Red and green have the same baseline. So I believe red should have baseline 1 (near the top of the screen), blue table is in front of the red so should have baseline 2 (or any number greater than 1). Green is in front of everything it should have baseline 3 (or any number greater than the blue baseline).
#342
Quote from: Cassiebsg on Tue 26/12/2017 19:22:05
Are you changing the mode to the hand to interact? or you just clicking it with the feet?

Right, maybe that mean the mouse is not to the interact mode to execute the function.
Maybe you could try to do this check just as debug test?
Code: ags

function repeatedly_execute_always()
{
  Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
  if (h == hotspot[1]) //ID number of the hotspot required
  mouse.Mode = eModeInteract;
}
#343
Quote from: Crimson Wizard on Fri 22/12/2017 22:02:19
You better remember which region player was before to see if regions has changed, and set new sounds only when they are changed.
If you do that, you could also remove "if (player.View != WALK)" check, because that becomes unnecessary, and set sounds to every walking loop too, not only the ones that are currently active.

This is right indeed. Also the "if (player.View != WALK)" check is unnecessary. It was enough to specific the view that need to be used only, like "player.View == WALK". This is called 40 times every second as long as player stands on a region but if the frame which as the linked sound is 3 which I suppose that doesn't happen every 40 times every second. But at the moment I am not sure about this. However I would check the region state change by using a boolean at all.
#344
I also think that Snarky's code will work as well. It might could look fancy to write a new module for it.:)
I have added more lines just to prevent hopefully some null errors while I was reading back. But I can't have a time to test this.
Code: ags

ViewFrame *frame;
 
function HandleFootstepsSound()
{
  Region*r = Region.GetAtRoomXY(player.x, player.y);
  if (player.View != WALK) return; // put your view
  else
  {
    if (r != region[1] && r != region[2]) return; //all the regions which contains sound
    else
    {
      if (r == region[1])
      {
        frame = Game.GetViewFrame(WALK, player.Loop, 3);
        frame.LinkedAudio = aFootstep_wood;
      } 
      else if (r == region[2])
      {
        frame = Game.GetViewFrame(WALK, player.Loop, 3);
        frame.LinkedAudio = aFootstep_wood_02;
      }
      else
      {
        frame.LinkedAudio = null;
      }
    }
  }
}
 
 
function repeatedly_execute_always() 
{
  HandleFootstepsSound();
}


#345
Quickly answer: I would start doing something like this but it's not tested, it might not work too.

Code: ags

ViewFrame *frame; // how many frames you need to play a sound, you could use an array if you need many frames.

function HandleFootstepsSound()
{
  Region*r = Region.GetAtRoomXY(player.x, player.y);
  if (player.View == WALK)
  {
    if (r == region[1])
    {
      frame = Game.GetViewFrame(WALK, player.Loop, 3);
      frame.LinkedAudio = aFootstep_wood;
    }
  }
}


function repeatedly_execute_always() 
{
  HandleFootstepsSound();
}
#346
Superlative work Crimson Wizard, thank you very much!
#347
Quote from: CaptainD on Fri 01/12/2017 16:34:52
EDIT - whoa!  Who needs breaks anyway?!?!  2:57:32.

CaptainD, I think you are unbeatable! :-D
It would be even sweet to play Last & Furious with the gamepad, just in case! :)
#348
Quote from: CaptainD on Fri 01/12/2017 14:46:19Next up: on-line multiplayer mode! ;)

+1
#349
You definitely beat me, well done CaptainD! :-D
#350
I had no doubts about it but it worked exceptionally fine! Thank you very much! :)
#351
Awesome Khris!

Thank you very much for your kind help.
I have to leave my workstation for now but I will let you know as soon as possible on tomorrow.
I really can't wait to test this!
Thank you very much again and have a good night.
#352
Congratulations to all of you guys!

Last 'n' Furious is totally amazing, really! I seriously got a lot of fun playing with it!!! :)
My record time is 03:07:20, can you do that better? :-D




(American Girl Scouts) +1
#353
Good evening to all AGSer folks!

I really hope that you're not tired for my noob questions.
The thing that I am going to ask you today it seems much simple to do, but at the moment I really can't find a good solution to it. So, I need to add an inventory item to a specific index, more specifically, where it was a certain item before to removing it. Well, into the manual I could find something like this: readonly InventoryItem* InvWindow.ItemAtIndex[]; but how I could use this for my purpose? How do you check where it is exactly a certain item into the inventory window?
#354
Hello Snarky, thanks for your response.
Maybe after some time I might have done so too, but fortunately I stopped in time.
In this case I think the workaround to edit the tag number via the translation file is definitely much simpler.
Thanks Snarky, Khris and Crimson Wizard.

Quote from: Khris on Tue 28/11/2017 15:11:23
Edit:
Gave this a try and it worked perfectly fine.
#355
Right, I understand. I test it and it's working fine.
It's simply enough to just change the numbers in the translation source, luckly. I've never tried this myself too.
Thanks again both for the info. :)
#356
Thanks both Khris and Crimson Wizard.

I would like to try to put all voice-overs into same speech.vox, since there are only two language at all.
So do you think I should go ahead and do something like this?

Code: ags

if (Game.TranslationFilename == "") // eng
{
  cEgo.Say("&1 Hello");
}
else
{
  cEgo.Say("&1x Ciao");
}


Although in this way there would be a lot of script that should be duplicated right?
#357
Good evening to all AGSer around the world.

I have a noob question to ask you.
My question is, if a game have a translation file and there is aviable the speech sound when talking, how Ags know which language is running to play properly a speech file according with the selected language when a character is talking?
#358
I am sorry because this is working just good.
For some odd reason, I didn't add UpdateSliderListBox(); whenever adding or removing an item...


Quote from: Khris on Wed 15/11/2017 16:55:43
It needs to be updated whenever the number of total items changes. How else is it supposed to work?

I am sorry about this but thank you very much for your help, it is all working good! :)
#359
Quote from: Khris on Tue 14/11/2017 14:04:55
Where did you move the slider? All the way to the bottom, I assume?

Yes, you are right. Well, the listbox get populated with items in run-time and in case they can even be deleted. So I think the slider should be updated dinamically I suppose. The listbox can contain a max of 5 items before the slider get enabled. If I start to populate the listbox with items and do something like this it work fine:

Code: ags

void UpdateSliderListBox()
{
  // calculate how many rows of items are going to be hidden
  int hiddenRows = (ListBox1.ItemCount - ListBox1.RowCount) - 5;
  if (hiddenRows > 0) 
  {
    SliderListBox1.Max = hiddenRows;
    SliderListBox1.Enabled = true;
  }
  else SliderListBox1.Enabled = false;
}


Code: ags

function SliderListBox1_OnChange(GUIControl *control)
{
  ListBox1.TopItem = (SliderListBox1.Max - SliderListBox1.Value);
}


Well, since I don't add an item or remove it, how to find the right formula?
#360
Okay, but this is strange, because it show exactly the same error message.
SMF spam blocked by CleanTalk