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

#401
Aaand you might say "Oh boy here we go again" but I really don't get it.

For all the things I've found on the forums I see a lot of complicated coding I don't understand yet, just to put a sound on a frame and also stuff about a channel just for the footsteps.
Are those still relevant?

Because I follow this amazing series of tutorials on YouTube on "How to use AGS" on a channel named densming.

They're still overwhelmingly relevant and very well done but of course, since that time some things have changed.

But one thing that's still there is that if I open let's say View1 and click on any frame, on the right side, in the properties, I have the option to select a sound for it.
If I understand it right, you don't need to name your audio file "Sound1" anymore because now there's a scroll down menu where you can choose from your audio list whatever the name?

Also, my sound is in .OGG file

So technically, in my head, I feel it should work just like that?

Or is it not just like that?

Any ideas?

Thanks!
#402
So if I'm getting what you're teaching me here is right:

PreviousSong is -1 because random starts at 0
So let's say i = 1 after random
Now PreviousSong becomes i which is 1
So now while randomizing again, while i is PreviousSong thus 1 it will keep randomizing

This is like magic to me, like writing a spell and boom!
Incredible.


Thank you all so much for your time and kindness

Cheers
#403
Quote from: Cassiebsg on Thu 25/11/2021 17:17:22
Create an int and change it for each song. Then just check if it matches the new random, if it does, run the random again until it doesn't  (use a while or for).

I will try to understand what you said and try to figure something out.

As a beginner, I barely understand the if thing, so I tried this but it didn't work.
(I created a global variable named SongNumber)

Code: ags

function repeatedly_execute() 
{ 
  if (SongNumber == 0)
  {
    if ((Channel == null) || !Channel.IsPlaying)
    {
      int i = Random(2);
      if (i == 0) Channel = aIntro01.Play(eAudioPriorityNormal, eOnce);SongNumber = 1;
      if (i == 1) Channel = aIntro02.Play(eAudioPriorityNormal, eOnce);SongNumber = 2;
      if (i == 2) Channel = aIntro03.Play(eAudioPriorityNormal, eOnce);SongNumber = 3;
    }  
  }
  else if (SongNumber == 1)
  {
    if ((Channel == null) || !Channel.IsPlaying)
    {
      int i = Random(1);
      if (i == 0) Channel = aIntro02.Play(eAudioPriorityNormal, eOnce);SongNumber = 2;
      if (i == 1) Channel = aIntro03.Play(eAudioPriorityNormal, eOnce);SongNumber = 3;
    }  
  }
  else if (SongNumber == 2)
  {
    if ((Channel == null) || !Channel.IsPlaying)
    {
      int i = Random(1);
      if (i == 0) Channel = aIntro01.Play(eAudioPriorityNormal, eOnce);SongNumber = 1;
      if (i == 1) Channel = aIntro03.Play(eAudioPriorityNormal, eOnce);SongNumber = 3;
    }
  }
  else if (SongNumber == 3)
  {
    if ((Channel == null) || !Channel.IsPlaying)
    {
      int i = Random(1);
      if (i == 0) Channel = aIntro01.Play(eAudioPriorityNormal, eOnce);SongNumber = 1;
      if (i == 1) Channel = aIntro02.Play(eAudioPriorityNormal, eOnce);SongNumber = 2;
    }  
  }
}   
#404
OK! So I finally discovered how to make sure it won't play that same song over and over again once the thing is launched.
I also made Global variable called "Channel" as "Audiochannel* type.

Right now I have this :

Code: ags


function repeatedly_execute() 
{ 
    if ((Channel == null) || !Channel.IsPlaying)
    {
    int i = Random(2);
    if (i == 0) Channel = aIntro01.Play(eAudioPriorityNormal, eOnce);
    if (i == 1) Channel = aIntro02.Play(eAudioPriorityNormal, eOnce);
    if (i == 2) Channel = aIntro03.Play(eAudioPriorityNormal, eOnce);
    }
}   



Now to find out how to make it so it won't repeat twice the same song that just played  :-D
#405
AHA !!! Thank you very much!!
#406
Hey thank you so much for the reply!

So I think I did what you told me to do:

Code: ags

AudioChannel* globalBGM;
function repeatedly_execute() 
{
 if (!globalBGM.IsPlaying) { 
    int i = Random(1);
    if (i == 0) globalBGM = aIntro02.Play();
    if (i == 1) globalBGM = aIntro03.Play();
  }
}


I put it in the global script.
But it doesn't work; the error message says "Error: Null pointer referenced"

So I tried some stuff, tried replacing "*" with a channel name, went to the manual, didn't find anything, can't make it work...
#407
Hiya!

So, I'm out of options, research and ideas...

What I'd like to do is having some kind of global script thingy or something that would play "global music" while playing through the game whatever the room you're in...
BUT I'd like the new song to be random every time a song ends.

By now I know how to create a channel and have it play a random song but it's always the same song repeating once done.

I know the different song lengths might be a problem, but I don't care having a moment without music based on the longest song if I can work around the Wait() thing that stops everything.
The Wait() idea was to create a "non-blocking" wait time based on the longest song and then it would choose a random song again.

I tried some stuff in the global script repeatedly_execute_always() But it's a mess  :-D

Any ideas?

Thanks in advance!  :)
#408
Aha! I'm sure that was part of the problem! Good to know, thanks!

I had it set on "Wholescreen" wich gave me the same problem as the Sierra thing when I tested that one.
Luckily Lucasarts fixed the thing  :grin:
#409
Hey thank you for the reply!

The ghost thing didn't work for me so I tried some stuff that didn't work neither.

But then I went to the general settings and tested the speech options and the Lucasarts speech fixed the whole problem just like that!
Now the speech shows up nicely on top of the player.

Thanks again! :)
#410
Hiya!

So when my player is close to the left or right border of the room and he says something, The speech text doesn't appear on top of him but is shifted left or right, depending on the character position, like if the speech text doesn't want to go beyond some invisible border from the center.

I've found a topic talking about an invisible narrator that would follow the player but didn't understand it and it didn't work for me.
Scripting is as far on the other side of me as a thing can be, but I did this thing:

Code: ags

function hBed_Look()
{
  player.SayAt(player.x - 250, player.y - 500, 500, "I don't need to sleep right now");
}


And it works.

I don't mind copy/paste the thing every time but I wonder if there's a way to make the speech x and y values based on the player position something permanent?
Perhaps in the Global Script?

Cheers!  :)
#411
Aye aye!
I like to thank everyone who took his time to try out the demo. Im really honored and motivated by it.  :)
Well, like I like to say, it's my first game and everything can only become better with time.
But now, I know it will be even better thanks to all the very interesting feedback I'm getting from you people. I'm learning every day.
Here or by mail, short or more detailed, they all have a positive and constructive impact...  :D

Know that I copy/paste all critics, suggestions, whatever... in my "Critics&Suggestions&Whatever" file, and every little detail will be given a serious though for sure. ;)

Thanks! :)
#412
Go to "character", there you have "talking color" that you can change.
The number of the color can be found in "palette".
#413
Heh, graphics look nice :)

I suggest you change the talking color for each character...

Keep it up!
#414
X X X  :-\

edit: heh now it works... Nice idea to make a box cover... and nice pic!  8)
#415
Well, I just made the French translation, for those who... well... want to play in French... 8)
#416
Heheh, looks nice!
Not even a very liitle thing about the story? :-X
#417
Check out the first post of this topic for more info and the download link! ;D
#418
yeah, darker red could be a little better, now you see the blood "too much"... btw, I love the ambient of those screenies... :)
#419
Heh those new screenies look great! :)

And since your asking... the most important thing to me in Maniac Mansion, was that.... :o creepy ambient they managed to put in the game... 8)
#420
I did read it. Before asking I always loose a lot of time trying to find out by myself and mess up a lot of things in my game.   :P

There was just a little error I did and found out just right now: it's first GUI, then object.. so it's 4,1,... and not 1,4...
And I reverted it by error because I based myself on a tutorial found on the site where they say "Object, GUI" instead of "GUI,Object", like it should be. So now you know it all...  ;)

Anyway, Scorpiorus, thx for your help, it works cool & fine, now!
SMF spam blocked by CleanTalk