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 - Crimson Wizard

#981
@Monsieur OUXX, File.GetFolder may be a useful addition, but that's rather not a "missing property" in the sense this thread was created for.

Regarding AudioChannel.PreferredType - frankly I'd rather suggest redesigning of how channels work, because now it looks like you are trying to find a way to "hack the system".
#982
AGS Games in Production / Re: The Witch House
Mon 21/08/2017 15:05:13
Really a good looking project :).
#983
Site & Forum Reports / Re: Bug reports
Tue 20/06/2017 12:01:51
Engine plugin API help page does not work for me, displays an empty page:
http://www.adventuregamestudio.co.uk/site/ags/plugins/engine/

Also, is it possible to edit this page, if something has changed?
#984
Quote from: Snarky on Wed 07/06/2017 07:43:44
Quote from: Crimson Wizard on Wed 07/06/2017 03:15:56
AFAIK when you run the game from the Editor (with F5), game does not look into Compiled at all, it gets files and subfolders that are located right in the project's root folder.

Well, I just tested it, and if you have a "sync" folder inside "Compiled", it will be read when you run the game from the editor and reference files in "$INSTALLDIR$/sync". (But you are correct that the directory is not automatically copied into "Compiled/Windows/sync"; you have to do that yourself when you're ready to distribute the game.)

Oh right... probably I had a moment of amnesia; it was just couple of months ago what I was working around that, because in 3.4.1 Compiled folder is now Compiled/Data.

So, yes, when debugging from Editor the rules are a bit complicated, the "installdir" is actually "made" of three folders:
- working directory, which is project root folder: for example game takes font files from there
- Compiled folder: I think this was made to take speech.vox from there, and maybe something else, like translation files.
- AudioCache folder: it takes audio files from there.

Basically it looks into project root first, and if it did not find needed files, it also checks either Compiled or AudioCache, depending on what kind of material it is looking for.

Why it was made so: I think to increase compilation speeds when testing, because it does not have to gather/package all those files every time.
#985
Quote from: bx83 on Wed 07/06/2017 03:16:29
Exactly how does the EXE reference it's own install dir? Should I make it '/sync/' or 'C:/moci/Compile/Windows/sync' or...?

In script you reference install dir using $INSTALLDIR$ tag like
Code: ags

File.Open("$INSTALLDIR$/sync/data.dat");


There is also "old style" without such tag:
Code: ags

File.Open("sync/data.dat");

But that will work only to read files, not write.

Also, AGS does not allow to use absolute paths (like C:/...), it simply won't open anything even if such file exists. This is done for security reasons.
#986
AFAIK when you run the game from the Editor (with F5), game does not look into Compiled at all, it gets files and subfolders that are located right in the project's root folder.

But when you order "Build Exe" it builds it to Compiled/Windows. But it won't put extra files there automatically, so you would need to copy them over when preparing package.
(EDIT: actually just files from Compiled get copied into Compiled/Windows, but not subfolders.)
#987
Quote from: Dave Gilbert on Mon 29/05/2017 13:27:04
Just saw this thread. One property I've always wanted is the ability to do FRAME/LOOP FLIPPING! You can check IF a frame is flipped, but you can't actually SET the frame as flipped.

It would also be useful to flip an entire loop!

You mean, during the game?
BTW, I think that's possible to do now by replacing frames with DynamicSprites, which you create from original and flip, then assign to the view frame.
#988
I seem to be late for this, but I'd just make a small note -

Quote from: bx83 on Sat 22/04/2017 04:26:26
I notice '$INSTALLDIR$/sync' - is this "C:\Program Files (x86)\Adventure Game Studio 3.4.0\sync" or "my installed game\sync" dir, or "my currently un-installed un-compiled game directory\sync", or...?

Quote from: Snarky on Sat 22/04/2017 07:50:22
While you're working on the game, it's â€" in your case â€" "K:\gamename\Compiled\sync" or "K:\gamename\Compiled\Windows\sync" (I believe AGS will read both directories). "K:\gamename\Compiled\Windows" is probably the directory you will ultimately distribute once the game is finished (unless you're aiming for another platform), so that's where I would put it.

$INSTALLDIR$ is the directory where main game data file is located at (*.exe or else) the moment you run it.

AGS does not really check more than one directory normally; there are special rules when running from under the Editor only (debugger mode): in that case Editor passes couple of alternative paths to the engine (one includes AudioCache, for instance).
#989
The easiest way to test this, I think, is to draw said letters on sprites instead of mouth animation :).
#990
Cassie, you keep adding updates to the same post after WEEKS, and I do not notice them in time: the main forum page does not display "new posts" icon in this case, so I don't check the thread.

I went here just by luck, because there was a new post in another module topic.


Regarding your question, for some reason AGS script editor does not support multiline strings. You do this instead:
Code: ags

String s = "Some string";
s = s.Append("Longer string");
s = s.Append("Even more longer string");
#991
The Rumpus Room / Re: Name the Game
Fri 07/04/2017 10:06:55
Quote from: Chrille on Fri 07/04/2017 09:18:10
Hmm those textures look familiar... Dark Forces?
That's 100% dark forces. Level 2 I think well, maybe not exactly 2, but one of the first ones. :=
#992
Quote from: Cassiebsg on Sun 26/03/2017 19:10:51
EDIT3 : I moved on to make a credits section (new script, with all introline changed to creditline, and the typewriter is now called twlC, only I can only run the credits once.  8-0 If I put the twl.Clear(); I get the null pointer reference at the end, if I remove it I get the null pointer reference at the start or the second run of credits.  8-0
Think I'll try and see if I can put the line someplace else, outside rep_exe_always and see if that helps.  (roll)

EDIT4: I noticed, after doing a search for the function, that IniFile also had a void Clear()... I changed the name of it, and that solved the problem of the null pointer reference.  :-D

Wait wait... what? Are you saying there is a bug that having two same functions in two types of objects may lead to error when calling it?

TBH I was sure twl.Clear() was causing errors because I did "twl.TypeOnLabel = null;" just before that, and Clear uses TypeOnLabel reference without checking if its null.
#993
My suggestion does not work because IsActive returns true until automatic typewriter clears text, and you do not need the text to be cleared until some other time.
You could use timer instead to know when start next typewriter.

But I think best way for now is to use one manual typewriter and just switch label it prints on. This will leave text on previous label until you explicitly tell it to clear.

Code: ags


String introlines[];
int introline_index;
int introline_count;
bool playingCredits;

TypewriterLabel twl;
 
function game_start()
{
  introline_count = 7;
  introlines = new String[introline_count];
  introlines[0] = "A fan game by     [";
  introlines[1] = "Sandra T. Almeida [";
  introlines[2] = "Made with             [";
  introlines[3] = "Adventure Game Studio [";
  introlines[4] = "based on the original TV show: [";
  introlines[5] = "Battlestar Galactica           [";
  introlines[6] = " ";
  introline_index = 0;
  
  lblTypedText1.Text = "";
  lblTypedText1t.Text = "";
  lblTypedText2.Text = "";
  lblTypedText2t.Text = "";
  lblTypedText3.Text = "";
  lblTypedText3t.Text = "";
  
  twl.TypeDelayMin = 2;
  twl.TypeDelayMax = 4;
  twl.TypeDelayStyle = eTypedDelay_Mixed;
  twl.TextReadTime = 5;
}
 
function repeatedly_execute_always()
{
        if (!playingCredits)
        {
                if (twl.IsActive)
                  twl.Tick();
          
                if (introline_index == 0) // typewriter has not start to type the first line yet
                {
                        // start first line
                        twl.TypeOnLabel = lblTypedText1t;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 1 && twl.IsIdle) // typewriter finished typing first line
                {
                        // start second line 
                        twl.TypeOnLabel = lblTypedText1;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 2 && twl.IsIdle) // typewriter finished typing second line
                {
                        // clear previous
                        lblTypedText1.Text = "";
                        lblTypedText1t.Text = "";
                        // start third line 
                        twl.TypeOnLabel = lblTypedText2t;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 3 && twl.IsIdle) // typewriter finished typing 3rd line
                {
                        twl.TypeOnLabel = lblTypedText2;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 4 && twl.IsIdle) // typewriter finished typing 4th line
                {
                        // clear previous
                        lblTypedText2.Text = "";
                        lblTypedText2t.Text = "";
                        twl.TypeOnLabel = lblTypedText3t;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 5 && twl.IsIdle) // typewriter finished typing 5th line
                {
                        twl.TypeOnLabel = lblTypedText3;
                        twl.Start(introlines[introline_index]);
                        introline_index++;
                }
                else if (introline_index == 6 && twl.IsIdle) // typewriter finished typing 5th line
                {
                        // clear previous
                        lblTypedText3.Text = "";
                        lblTypedText3t.Text = "";
                        twl.TypeOnLabel = null;
                        twl.Clear();
                }
        }
}

#994
The Rumpus Room / Re: What grinds my gears!
Fri 24/03/2017 11:24:23
Quote from: Stupot+ on Fri 24/03/2017 01:16:42
I keep getting adverts for the company I bloody work for!
I was getting adverts for company my company has produced software for :).
#995
Quote from: Cassiebsg on Sat 11/03/2017 14:06:46
EDIT: Been trying this but now the second line (or any other after the 1st) never starts... :( Not sure what I did wrong, probably the arrays?

Can you post your current code again?
#996
The first error in this script is that you are remembering all typewriter indexes in same variable, and since some of them run simultaneously or have to stay on screen for some time, it gets overwritten every time and you loose control over previous ones.
Also, you are starting two lines at the same time, that's why... they are typing at same time.

Instead of "int footline_tw" you need "int footline_tw[N]", where N is the number of labels you have, or at least the number of simultaneous typewriters, whichever is more convenient.

As I mentioned earlier, you need to set read time to some big number to prevent automatic removal of a text.

Code: ags

TypewriterPreset.SetGeneral(footline_TYPEWRITER_PRESET, 2, 4, eTypedDelay_LongSpace, 1000); // notice 1000


The code may look something like:
Code: ags

function repeatedly_execute_always()
{
  if (footline_tw[0] == NO_TYPEWRITER) // first typewriter was not started yet
  {
    if (Game.DoOnceOnly("1st intro line SMALL FONT"))
    {
      // start first line
      footline_tw = lblTypedText1t.Typewriter(footlines[footline_index], eNoBlock, footline_TYPEWRITER_PRESET);
      footline_index++;
    }
  }
  if (footline_tw[0] != NO_TYPEWRITER && !TypewriterRunners.IsActive[footline_tw[0]]) // first typewriter has started and finished typing
  {
    if (Game.DoOnceOnly("1st intro line BIG FONT"))
    {
      // start second line 
      footline_tw[1] = lblTypedText1.Typewriter(footlines[footline_index], eNoBlock, footline_TYPEWRITER_PRESET);
      footline_index++;
    }
  }
  if (footline_tw[1] != NO_TYPEWRITER && !TypewriterRunners.IsActive[footline_tw[1]]) // second typewriter has started and finished typing
  {
    if (Game.DoOnceOnly("2nd intro line SMALL FONT"))
    {
      // Remove first two lines
      TypewriterRunners.Cancel(footline_tw[0]);
      TypewriterRunners.Cancel(footline_tw[1]);
      // Start third line
      footline_tw[2] = lblTypedText2t.Typewriter(footlines[footline_index], eNoBlock, footline_TYPEWRITER_PRESET);
      footline_index++;
    }
  }
  if (footline_tw[2] != NO_TYPEWRITER && !TypewriterRunners.IsActive[footline_tw[2]]) // third typewriter has started and finished typing
  {
    if (Game.DoOnceOnly("2nd intro line BIG FONT"))
    {
      // start fourth line 
      footline_tw[3] = lblTypedText3.Typewriter(footlines[footline_index], eNoBlock, footline_TYPEWRITER_PRESET);
      footline_index++;
    }
  }

  // and so on...
}


There should be more optimal way to do this, but my brain is not working well right now.
#997
Quote from: Cassiebsg on Fri 10/03/2017 10:04:17
EDIT 6: Am I over doing this? Sorry.
Now I'm trying to complicate a simple thing... I am here trying to keep 2 lines on screen, instead of writing one line, clear, and then write a second line. I realized that I can just use the [ to break a line into 2, and I would do that, if I didn't want to use a smaller font on the 1st line and a bigger on the second. (roll)
I've managed to do it, by writing 2 lines simultaneous (though I would prefer to write one at a time), but the first line is still removed before the second. Is there a simple setting I can change, or this is not possible without some complicated rewrite?


If you want to have 2 different fonts then you will have to use 2 different objects, because right now TypedTextDrawing does not support changing font when typing, and Labels, Buttons and Overlays do not support multiple fonts on their own (and my module cannot make them do). So yes, you will need 2 Labels and TypewriterLabel objects, linked to each other. You actually did that, if I understand right?

If you want first line to stay you need to tell it not to clear text at all, or keep it for a long time. That depends on what function you use to run it.

If you are manually managing TypewriterLabel, then simply do not call "Clear" function for it.

If you are using Label.Typewriter extender function, then I realized that I did not provide option to keep it forever until you say to remove it, but there is a trick you can use: when you set up its properties with TypewriterPreset.SetGeneral, last parameter is "reading time". Simply set that reading time to some very big number (you may actually do same if you are using TypewriterLabel object yourself).
#998
Quote from: Cassiebsg on Fri 10/03/2017 08:44:19
Okay, I figured out why it's not working... seems like it can't render over my BG video?

I don't know; that depends on how this video is rendered, which I never tried out myself. Maybe video gets drawn above text?
If video plugin can somehow return drawing surface of its own, you may draw upon it instead.

You may try using TypedTextOverlay or TypedTextLabel instead of TypedTextDrawing, if you have a possibility to use overlay/GUI in your room.


I will repost the module after I fix some errors and write easier explanation on how to use it.
#999
Sorry, I think it did not work for you because you do not set tt_draw.TextColor, it is black by default, and if your room background is black, that would explain why you do not see anything.
#1000
Sorry, but I think this module is not ready. I am cancelling it until I have time to work more on it.
SMF spam blocked by CleanTalk