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

Topics - mishels

#1
Hi,

I have a module in which a few functions call each other:

function A()
{
   ...
}

function B()
{
   ...
   C();
   ...
}

function C()
{
   ...
   A();
   ...
}

Now AGS tells me that it doesn't know function C() from the code of function B(). There is an import in the header but it hasn't stummbled upon the function itself.
I know that if I switch the places of function B and C the problem will be solved but I want to keep this order. Can I?
I know that in C or C++ I can just declare the function at the top and use it everywhere I want.
Can I do this in AGS?

And is there a way to get over this situation in AGS:

function A()
{
   ...
   B();
   ...
}

function B()
{
   ...
   A();
   ...
}


Thanks,
Mishel.
#2

This is embarresing, I can add new options to a topic by clicking the 'new option' button, but what if I added a few more options than I needed? Am I destined to see them empty there for the rest of the games development life?

I guess I can restore to a backup of the game fiiles but this is stupid, there must be something I am not seeing here...
#3

Hi all,
After recording all the speech files for a little thingy in AGS I noticed that each time a speech file is played by AGS, there is a distinctive tick at the beginning and end of the speech sound. When you have several lines of text in a dialog, this can get annoying really fast.

I looked at the sound clips and figured they are not properly recorded and that the natural noise of my cheap microphone is the reason, which was true.

So I worked three hours to fade in and out each clip individually and now when I play them in any sound clip playing tool there is no ticks at the beginning and end of the clip.

All happy and excited I placed the files in the proper directory and to my surprise I still heard those ticks, albeit somewhat softer.

I tried several things and after a while I noticed that the ticks did not sound when I was using wav files for the sound clips. They still do sound if I use ogg files or mp3 files.

I thought maybe it has something to do with having to decode the files before playing them but I just checked on my computer and the mp3 files are also ticking with other media playing applications so the only one to blame now is the program that converts the wav files to mp3 or ogg files.

Has anyone encounted this before? I checked with two converting programs and it still happened. I know that when converting to mp3 or ogg you loose data but I never thought it could add ticks :-)

Any suggestion for a convertion program that may solve this problem for me? Using wav files is takes alot of space...
#4
Completed Game Announcements / Finger Puller
Mon 18/09/2006 08:53:09
Hi all,
This is not quite a real game, I would put it under the Joke games category.
It is my first creation with AGS and was meant more as an experiment with a nice result.
I think the idea is nice :-)

You can Right Click and Save Target As on this:
FingerPuller

Make sure you slap me before and after the fact...

Mishel.
#5
I noticed that when I use PlaySound it runs the sound effect and continues doing other stuff on the list of thigs to do. I want the game to wait for the sound to end and then continue.

I have tried this code:

PlaySound(1);
while(IsSoundPlaying())
{
  // Do nothing
}
DisplayMessage(6);
cEgo.ChangeRoom(3);


but the game encounters an internal error with this description:
Error: run_text_script1: error -6 running function 'hotspot1_a':
Error: Script appears to be hung (15001 while loop iterations without an update in Room 2 script (line 11)


While writing this message I realized that this code can not wait for the sound to end since this code is run in the big game loop so the solution probably lies in an event that singnals the end of the sound effect.

But that is just a guess.
I also saw the wait functions and though that as I know the time length of the sound clip I can wait as many loops as neccessary to end the sound.
But I am looking for the cleaner, more generic solution.
I remember reading about some function that runs each loop, I could in theory wait for the sound to finish on that loop and call a function to continue the execution of my script, I am sure that will work, but still I keep thinking there is a simpler solution which must be in this wonderful tool.

So, how do I wait for the end of a sound effect and do some stuff after it?

Thanks,
Mishel.
#6
I am thinking of creating a game in Hebrew and for this I need the Dialog window to display the text in a right to left direction. Is that possible?

How can I change the way the Dialog Window displays the text?
SMF spam blocked by CleanTalk