Narrator Speech à  la Superbrothers: Sword and Sworcery

Started by bulka_tarta, Fri 27/01/2017 16:02:04

Previous topic - Next topic

bulka_tarta

Hey there,

I'm new around here so please bare with me (I'm mostly do game art / design, so my programming knowledge basically equals zero).
I started playing around with AGS a couple days ago and today I got really stuck at making custom Speech/Say dialogues.

What I'm after is something similar to Superbrothers style of narration.
Whenever the player interacts with an object, the text instead of showing above characters head, would slide in from the top with a custom background.
The background that is used for Serria Speech Style would seem like best starting point, but the GUI for that doesn't have the "layout" options, and I can't seem to have it being displayed on top.

This Topic was the closest thing I have managed to find, that could somehow do what I was after.
I tried going with the Akril 15's last post and have used the bits of code found on the last post. Of course, I got some errors, but I have managed to get through them - I used the transparent font, I made a GUI with Label, named everything correctly until I had no errors.

The things is... nothing has changed. I'm using LucasArts speech mode, and the only difference is that it has transparent font and the GUI appears on top of the screen.
What did I miss?

EDIT:
I did some digging and I have something like this:

Code: ags

void MySay(this Character*, String text) {

  TextButtonOK.Visible = false;
  TextLabel.Visible = false;
  gTextTop.Visible = true;  
  TextLabel.Text = text;
  gTextTop.TweenPosition(0.5, 0, -1);
  TextLabel.Visible = true;
  Wait(40);
  TextButtonOK.Visible = true;

}


Would this be a correct way of setting this up? I placed the code at the top of Global Script. The visibility stuff is just some fluff to make it a tad nicer.
I set up the original position of the GUI to be off screen, so that way I can tween it onto the screen.

A little extra: I tried to get the button and the text to tween their transparency, but Tween Transparency options don't seem to work with buttons and labels?
I also tried tweening text color from 225, 0, 255 (magenta transparency) to the color of the text I'm planning on using, but that way the Tween function just goes through all of the colors in between magenta and my color :P
I imagine it's fairly simple thing to do, so I will do some more digging on this.

Also, I realized that calling "MySay" in dialogues doesn't quite work (e.g. cHero.MySay("blah");) and I imagine it would need some further work when setting up custom Say function for dialogues?

And the last thing... currently that Say function is set up to wait 1sec before player can click on "ok" button to close the option. Would there be a way to set up a timer that waits long enough depending on the text length? Like it does in the original MI style speech?

SMF spam blocked by CleanTalk