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

#1
Ooooh thank you so much! It worked perfectly now.
#2
Oh, sorry my bad. What I mean with that is the code works fine if I use only the wait function, the speech draws and I only can interact when it finishes, but if I use the waitmousekey the speech draws fine, I can interact but the speech is still draw on the screen (doesn't skipped with the click).
#3
The code is this:
Code: ags
// new module script
DynamicSprite*messagetext;

#define GWIDTH 300
#define GHEIGHT 30
#define GTIMER 1

void MySay(this Character*, String message) {
  if (messagetext == null) messagetext = DynamicSprite.Create(GWIDTH, GHEIGHT); 
  DrawingSurface*ds = messagetext.GetDrawingSurface();
  ds.Clear();
  ds.DrawingColor = this.SpeechColor;
  int w = GWIDTH - 20;
  int wt = GetTextWidth(message, Game.SpeechFont) + 5;
  if (wt < w) w = wt;
  gSpeech.Width = w + 20;
  gSpeech.X = (Screen.Width - w - 20) / 2; 
  int y = (GHEIGHT - GetTextHeight(message, Game.SpeechFont, w)) / 2;
  ds.DrawStringWrapped(10, y, w, Game.SpeechFont, eAlignCenter, message);
  ds.Release();
  gSpeech.BackgroundGraphic = messagetext.Graphic;
  gSpeech.Visible = true;
  SetTimer(GTIMER, ((message.Length / game.text_speed) + 1) * GetGameSpeed());
  WaitMouseKey(((message.Length / game.text_speed) + 1) * GetGameSpeed()); //I added this but doesn't work
}

function repeatedly_execute_always() {
  GUI*g = gSpeech;
  gBlack.Visible = g.Visible;
  if (g.Visible) {
    gBlack.SetPosition(g.X, g.Y);
    gBlack.SetSize(g.Width, g.Height);
  }

 if (IsTimerExpired(GTIMER)) gSpeech.Visible = false;

}
#4
I tried that but nothing happen
#5
Oh I didn't know that will work, thanks. But now I can't get how to make the speech skippable
#6
Hi, I was trying to create my own function to write the speech on a gui, this function works perfect drawing the text on the gui, but the only problem is that the player can walk while and interact while the speech is draw in the gui (something like SayBackground) and the speech can't be skipped. Searching in the help menu of ags I found that you can use GUI.AsTextWindow but I can't get to work it. I use the thumbleweed script and the AGS version is the latest version.

I tried to add a timer to "Block" the interactions while the speech is on screen but doesn't work.

Code: ags
// new module script
DynamicSprite*messagetext;

#define GWIDTH 300
#define GHEIGHT 30
#define GTIMER 1
#define TEST 1

void MySay(this Character*, String message) {
  if (messagetext == null) messagetext = DynamicSprite.Create(GWIDTH, GHEIGHT); 
  DrawingSurface*ds = messagetext.GetDrawingSurface();
  ds.Clear();
  ds.DrawingColor = this.SpeechColor;
  int w = GWIDTH - 20;
  int wt = GetTextWidth(message, Game.SpeechFont) + 5;
  if (wt < w) w = wt;
  gSpeech.Width = w + 20;
  gSpeech.X = (Screen.Width - w - 20) / 2; 
  int y = (GHEIGHT - GetTextHeight(message, Game.SpeechFont, w)) / 2;
  ds.DrawStringWrapped(10, y, w, Game.SpeechFont, eAlignCenter, message);
  ds.Release();
  gSpeech.BackgroundGraphic = messagetext.Graphic;
  gSpeech.Visible = true;
  SetTimer(TEST, (message.Length / game.text_speed));
  SetTimer(GTIMER, ((message.Length / game.text_speed) + 1) * GetGameSpeed());
}

function repeatedly_execute() { //this was supposed to work like "Blocking" but don't work
  if (gSpeech.Visible) {
    Wait(TEST);
  }
}

function repeatedly_execute_always() {
  GUI*g = gSpeech;
  gBlack.Visible = g.Visible;
  if (g.Visible) {
    gBlack.SetPosition(g.X, g.Y);
    gBlack.SetSize(g.Width, g.Height);
  }

 if (IsTimerExpired(GTIMER)) gSpeech.Visible = false;

}
#7
When I was working on the Thimbleweed Park Dott Version I did it in this way:

I added 2 buttons (Because I never continued making the game, but you can add the buttons amount per character you have)
And I added the following code in the OnClick function.
Code: ags
function btnReyes_OnClick(GUIControl *control, MouseButton button)
{
  if (player == cReyes) {
  }
  else {
    cReyes.SetAsPlayer();
    btnReyes.NormalGraphic = 325; //Button Sprite with the Reyes face off
    btnRay.NormalGraphic = 322; //Button Sprite with the Ray face on
  }
}

function btnRay_OnClick(GUIControl *control, MouseButton button)
{
  if (player == cRay) {
  }
  else {
    cRay.SetAsPlayer();
    btnRay.NormalGraphic = 326; //Button Sprite with the Ray face off
    btnReyes.NormalGraphic = 323; //Button Sprite with the Reyes face on
  }
}


Screenshots:
Spoiler
[imgzoom]https://i.imgur.com/7gQ4G2t.png[/imgzoom]

[imgzoom]https://i.imgur.com/Jk7qYvs.png[/imgzoom]
[close]
#8
Hi, in my game I have different characters, and I want to have different verbs color, I know that I can have different color versions of the verbs and apply it for each character, but exist a way to tint the button graphics? So I only have the verb sprites with only a color (white for example) and tint it for each character.
Thanks
#9
Quote from: Khris on Fri 24/04/2020 19:28:46
That's the thing though, ogg videos are supposed to end in *.ogv and go into the game folder, all other video file types go in the compiled folder.
But the avi files are in the compiled folder and I get the message, I don't know why.
Quote from: Khris on Fri 24/04/2020 19:28:46
Is "video playback error" the only message you're getting? Or is there additonal info?
Yes
#10
Quote from: Slasher on Fri 24/04/2020 17:26:31
You said .ogg.... in your game folder (not compiled folder)... right?

.avi goes in compiled folder..
No no, I put the ogg/avi in the conpiled folder
#11
Quote from: Slasher on Fri 24/04/2020 17:05:16
Why not try another video and see it that appears ok....
Yes, that was my first thought. I tried 5 other new videos yet and get the same problem
#12
Quote from: Crimson Wizard on Fri 24/04/2020 11:18:07
I forgot to ask, you mentioned it played before, have you updated to 3.5.0 only recently and it stopped playing then, or it was playing in 3.5.0 initially?
It was playing in 3.5.0 initially, I started making a new game all in this version.
#13
Quote from: Crimson Wizard on Fri 24/04/2020 03:11:53
Please tell what is the video format, and whether you test the game running from the editor or from compiled folder, in windowed or fullscreen.
The file is avi (But i tried with ogg tooo and the result is the same). I test the game running from the editor and the compiled folder too, and in windowed and fullscreen mode. In all of the possibilities I get the error.
#14
Hi, until today the video playing at the beggining of my game was playing right but a few hours ago when I run my game it goes directly to the first room and a message display that says: "Video Playing Error". I don't know how to fixed it.

EDIT: I'm usin the new 3.5.0 ags version)
#15
I really love the art, I don't know why but it reminds me of habbo (I don't know if you know what game is) and the premises of the game have a lot of potential, can't wait for it!
#16
I really love both, but I prefer the second one (on the right). The character gives me a lot feelings of lucasarts games (specially indiana jones). I hope we can see more things about this game soon.
#17
Concept: Cat (The limited palette gives nostalgic and (in this particular color palette) a warm cute scenery)
Playability: VampireWombat (That castle would have a lot of rooms and secrets to explore)
Artistic Execution: Deabriel (I really want to see it in a game, it gives me a lot of lucasarts games feeling)
#18
First: 9
Second: 7
Third: 8
#19
I think it's in the wrong board   (laugh)
#20
The Rumpus Room / Re: Name the Game
Thu 25/04/2019 07:31:52
Quote from: Danvzare on Wed 24/04/2019 18:20:42
Hey, I remember that being one of the first AGS games I ever played.  :-D
I also remember disliking it.
So um... two conflicting emotions there. Hmm, I'm sure nostalgia will win over.  :)

Hmm... Don't Escape 4?
Yeah maybe I like it because the nostalgia, but it's not a incredible amazing game, it's simple but funny I thought.
And no, isn't Don't scape 4.

Quote from: josiah1221 on Thu 25/04/2019 04:45:06
Midnight Scenes!
Yeeees, it is. Is a game that I played a few months ago and I really like it. Well, you can go with the next.
SMF spam blocked by CleanTalk